summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd-terminal/sysview.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-terminal/sysview.c b/src/libsystemd-terminal/sysview.c
index fde87d1117..6c1a9543b9 100644
--- a/src/libsystemd-terminal/sysview.c
+++ b/src/libsystemd-terminal/sysview.c
@@ -893,11 +893,11 @@ static int context_ud_hotplug(sysview_context *c, struct udev_device *d) {
p = d;
seatname = NULL;
- while ((p = udev_device_get_parent(p))) {
+ do {
seatname = udev_device_get_property_value(p, "ID_SEAT");
if (seatname)
break;
- }
+ } while ((p = udev_device_get_parent(p)));
seat = sysview_find_seat(c, seatname ? : "seat0");
if (!seat)