]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind-session: use one_zero where appropriate
authorMike Yuan <me@yhndnzj.com>
Wed, 3 Jan 2024 04:13:42 +0000 (12:13 +0800)
committerMike Yuan <me@yhndnzj.com>
Thu, 4 Jan 2024 08:19:19 +0000 (16:19 +0800)
src/login/logind-session.c

index 3b105ab5118f3f5f482a6cc4fc655fa174a2018a..7f007caf75698f111d1703fe25e73b6866ae3a84 100644 (file)
@@ -240,16 +240,16 @@ int session_save(Session *s) {
                 "# This is private data. Do not parse.\n"
                 "UID="UID_FMT"\n"
                 "USER=%s\n"
-                "ACTIVE=%i\n"
-                "IS_DISPLAY=%i\n"
+                "ACTIVE=%s\n"
+                "IS_DISPLAY=%s\n"
                 "STATE=%s\n"
-                "REMOTE=%i\n",
+                "REMOTE=%s\n",
                 s->user->user_record->uid,
                 s->user->user_record->user_name,
-                session_is_active(s),
-                s->user->display == s,
+                one_zero(session_is_active(s)),
+                one_zero(s->user->display == s),
                 session_state_to_string(session_get_state(s)),
-                s->remote);
+                one_zero(s->remote));
 
         if (s->type >= 0)
                 fprintf(f, "TYPE=%s\n", session_type_to_string(s->type));