1
0
mirror of https://github.com/systemd/systemd.git synced 2025-05-27 21:05:55 +03:00

sleep,home: clean up logs for session freezer a bit

This commit is contained in:
Mike Yuan 2024-05-30 14:45:21 +08:00
parent 12904d5387
commit 61fbc58c46
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3
2 changed files with 6 additions and 8 deletions

View 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;

View 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) {