chiark / gitweb /
bus: update kdbus.h (ABI break)
[elogind.git] / src / login / loginctl.c
index 7e64066479f0ad3241d22457d07205bc12c24294..6900253b0d47a9a1ace0be8254f2e8ba4f46277d 100644 (file)
@@ -372,7 +372,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
                 { "Remote",     "b", NULL, offsetof(SessionStatusInfo, remote) },
                 { "Timestamp",  "t", NULL, offsetof(SessionStatusInfo, timestamp) },
                 { "User",       "(uo)", prop_map_first_of_struct, offsetof(SessionStatusInfo, uid) },
-                { "Seat",       "(so)", prop_map_first_of_struct, offsetof(SessionStatusInfo, id) },
+                { "Seat",       "(so)", prop_map_first_of_struct, offsetof(SessionStatusInfo, seat) },
                 {}
         };
 
@@ -419,7 +419,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
                 printf("\n");
         }
 
-        if (i.seat) {
+        if (!isempty(i.seat)) {
                 printf("\t    Seat: %s", i.seat);
 
                 if (i.vtnr > 0)
@@ -453,10 +453,12 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
 
                 printf("\n");
         } else if (i.type) {
-                printf("\t    Type: %s\n", i.type);
+                printf("\t    Type: %s", i.type);
 
                 if (i.class)
                         printf("; class %s", i.class);
+
+                printf("\n");
         } else if (i.class)
                 printf("\t   Class: %s\n", i.class);