]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sleep,home: clean up logs for session freezer a bit
authorMike Yuan <me@yhndnzj.com>
Thu, 30 May 2024 06:45:21 +0000 (14:45 +0800)
committerMike Yuan <me@yhndnzj.com>
Thu, 30 May 2024 13:51:48 +0000 (21:51 +0800)
src/home/homework.c
src/sleep/sleep.c

index 428f83291164ad542bc0dc371d4be55c5df26911..b5569046511a387237649b17fd5043d471a2419b 100644 (file)
@@ -1875,12 +1875,11 @@ static int user_session_freezer(uid_t uid, bool freeze_now, UnitFreezer **ret) {
 
         r = getenv_bool("SYSTEMD_HOME_LOCK_FREEZE_SESSION");
         if (r < 0 && r != -ENXIO)
-                log_warning_errno(r, "Cannot parse value of $SYSTEMD_HOME_LOCK_FREEZE_SESSION, ignoring.");
+                log_warning_errno(r, "Cannot parse value of $SYSTEMD_HOME_LOCK_FREEZE_SESSION, ignoring: %m");
         else if (r == 0) {
                 if (freeze_now)
-                        log_notice("Session remains unfrozen on explicit request ($SYSTEMD_HOME_LOCK_FREEZE_SESSION "
-                                   "is set to false). This is not recommended, and might result in unexpected behavior "
-                                   "including data loss!");
+                        log_notice("Session remains unfrozen on explicit request ($SYSTEMD_HOME_LOCK_FREEZE_SESSION=0).\n"
+                                   "This is not recommended, and might result in unexpected behavior including data loss!");
 
                 *ret = NULL;
                 return 0;
index 1911ef256e89d0a34cc14ed781feac01b89d9e9d..0402bb07f3d9db2298bdce326d715178a31f603a 100644 (file)
@@ -606,10 +606,9 @@ static int run(int argc, char *argv[]) {
         if (r != 0)
                 (void) unit_freezer_new_freeze(SPECIAL_USER_SLICE, &user_slice_freezer);
         else
-                log_notice("User sessions remain unfrozen on explicit request "
-                           "($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS is set to false). This is not recommended, "
-                           "and might result in unexpected behavior, particularly in suspend-then-hibernate "
-                           "operations or setups with encrypted home directories.");
+                log_notice("User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).\n"
+                           "This is not recommended, and might result in unexpected behavior, particularly\n"
+                           "in suspend-then-hibernate operations or setups with encrypted home directories.");
 
         switch (arg_operation) {