struct udev_device *d;
const char *sn, *name, *sysfs, *subsystem, *sysname;
char *l, *k;
+ bool is_master;
sysfs = udev_list_entry_get_name(*item);
if (!path_startswith(sysfs, sub))
if (isempty(sn))
sn = "seat0";
- /* fixme, also check for tag 'seat' here */
+ /* Explicitly also check for tag 'seat' here */
if (!streq(seat, sn) || !udev_device_has_tag(d, "seat")) {
udev_device_unref(d);
*item = udev_list_entry_get_next(*item);
continue;
}
+ is_master = udev_device_has_tag(d, "master-of-seat");
+
name = udev_device_get_sysattr_value(d, "name");
if (!name)
name = udev_device_get_sysattr_value(d, "id");
free(k);
if (asprintf(&l,
- "(%s:%s)%s%s%s",
+ "%s%s:%s%s%s%s",
+ is_master ? "[MASTER] " : "",
subsystem, sysname,
name ? " \"" : "", name ? name : "", name ? "\"" : "") < 0) {
udev_device_unref(d);