]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sleep: reword some debug messages 16979/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Sep 2020 11:19:53 +0000 (13:19 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Sep 2020 15:40:46 +0000 (17:40 +0200)
I think the sentences sound more natural this way.

src/sleep/sleep.c

index cf7e238ad4ca25f99a7250ead51c933760dae17c..6bb1a04793db1892f06abdc747a733234cfffae1 100644 (file)
@@ -160,14 +160,13 @@ static int lock_all_homes(void) {
 
         r = sd_bus_call(bus, m, DEFAULT_TIMEOUT_USEC, &error, NULL);
         if (r < 0) {
-                if (bus_error_is_unknown_service(&error))
-                        return log_debug("systemd-homed is not running, skipping locking of home directories.");
+                if (!bus_error_is_unknown_service(&error))
+                        return log_error_errno(r, "Failed to lock home directories: %s", bus_error_message(&error, r));
 
-                return log_error_errno(r, "Failed to lock home directories: %s", bus_error_message(&error, r));
+                return log_debug("systemd-homed is not running, locking of home directories skipped.");
         }
 
-        log_debug("Successfully requested for all home directories to be locked.");
-        return 0;
+        return log_debug("Successfully requested locking of all home directories.");
 }
 
 static int execute(char **modes, char **states) {