summaryrefslogtreecommitdiff
path: root/src/login/loginctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-06-21 16:14:53 +0200
committerLennart Poettering <lennart@poettering.net>2012-06-21 16:14:53 +0200
commit0604381b9dbef4cc498b5a77311e1da99c1430b8 (patch)
treeec766081c20d07ddd17c825d42569fbddefdcbe8 /src/login/loginctl.c
parentf1a8e221ecacea23883df57951e291a910463948 (diff)
logind: introduce a state for session, being one of online, active, closing
online = logged in active = logged in and session is in the fg closing = nominally logged out but some left-over processes still around Related to: https://bugzilla.gnome.org/show_bug.cgi?id=677556
Diffstat (limited to 'src/login/loginctl.c')
-rw-r--r--src/login/loginctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 18f56f0124..a838a54086 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -364,7 +364,7 @@ typedef struct SessionStatusInfo {
pid_t leader;
const char *type;
const char *class;
- bool active;
+ const char *state;
} SessionStatusInfo;
typedef struct UserStatusInfo {
@@ -458,8 +458,8 @@ static void print_session_status_info(SessionStatusInfo *i) {
} else if (i->class)
printf("\t Class: %s\n", i->class);
-
- printf("\t Active: %s\n", yes_no(i->active));
+ if (i->state)
+ printf("\t State: %s\n", i->state);
if (i->default_control_group) {
unsigned c;
@@ -597,6 +597,8 @@ static int status_property_session(const char *name, DBusMessageIter *iter, Sess
i->type = s;
else if (streq(name, "Class"))
i->class = s;
+ else if (streq(name, "State"))
+ i->state = s;
}
break;
}
@@ -621,8 +623,6 @@ static int status_property_session(const char *name, DBusMessageIter *iter, Sess
if (streq(name, "Remote"))
i->remote = b;
- else if (streq(name, "Active"))
- i->active = b;
break;
}