chiark / gitweb /
journal: fix field retrieval by name
[elogind.git] / src / loginctl.c
index ba8020df23972563bc0b6973bd50ec7798062c32..1be47c8dde9b8a3340c251a947ebbf49d5a3a2f6 100644 (file)
@@ -393,7 +393,7 @@ static void print_session_status_info(SessionStatusInfo *i) {
 
                 printf("\t  Leader: %u", (unsigned) i->leader);
 
-                get_process_name(i->leader, &t);
+                get_process_comm(i->leader, &t);
                 if (t) {
                         printf(" (%s)", t);
                         free(t);
@@ -1063,10 +1063,9 @@ static int show(DBusConnection *bus, char **args, unsigned n) {
                         uid_t uid;
                         uint32_t u;
 
-                        r = get_user_creds((const char**) (args+i), &uid, NULL, NULL);
-                        if (r < 0) {
+                        ret = get_user_creds((const char**) (args+i), &uid, NULL, NULL);
+                        if (ret < 0) {
                                 log_error("User %s unknown.", args[i]);
-                                r = -ENOENT;
                                 goto finish;
                         }