X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Floginctl.c;h=30e97e352af09a2556ed34703ffa33e7bdbd2332;hp=1be47c8dde9b8a3340c251a947ebbf49d5a3a2f6;hb=55efac6cbcea0d8edda9c6820620ceb390009e7a;hpb=4bba9156da3e1df2cee24d10d7cd88c776ef4179;ds=sidebyside diff --git a/src/login/loginctl.c b/src/login/loginctl.c index 1be47c8dd..30e97e352 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -349,6 +349,7 @@ typedef struct SessionStatusInfo { const char *service; pid_t leader; const char *type; + const char *class; bool active; } SessionStatusInfo; @@ -431,10 +432,19 @@ static void print_session_status_info(SessionStatusInfo *i) { if (i->type) printf("; type %s", i->type); + if (i->class) + printf("; class %s", i->class); + printf("\n"); - } else if (i->type) + } else if (i->type) { printf("\t Type: %s\n", i->type); + if (i->class) + printf("; class %s", i->class); + } else if (i->class) + printf("\t Class: %s\n", i->class); + + printf("\t Active: %s\n", yes_no(i->active)); if (i->control_group) { @@ -449,7 +459,7 @@ static void print_session_status_info(SessionStatusInfo *i) { else c = 0; - show_cgroup_by_path(i->control_group, "\t\t ", c); + show_cgroup_by_path(i->control_group, "\t\t ", c, false); } } } @@ -501,7 +511,7 @@ static void print_user_status_info(UserStatusInfo *i) { else c = 0; - show_cgroup_by_path(i->control_group, "\t\t ", c); + show_cgroup_by_path(i->control_group, "\t\t ", c, false); } } } @@ -571,6 +581,8 @@ static int status_property_session(const char *name, DBusMessageIter *iter, Sess i->service = s; else if (streq(name, "Type")) i->type = s; + else if (streq(name, "Class")) + i->class = s; } break; }