]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
various: add %m in messages
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Jun 2022 15:49:27 +0000 (17:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Jun 2022 05:53:14 +0000 (07:53 +0200)
Sometimes we want to suppress strerror() message because the are providing
something better. But in those cases, it seems it was just forgotten.

src/core/bpf-lsm.c
src/userdb/userwork.c
src/volatile-root/volatile-root.c

index d3e92b98a62d94e8a29c52ef504e98cf2262cc73..46fc8c8d3b6bc90cb9e8704f0ac376179ae7eb01 100644 (file)
@@ -83,7 +83,7 @@ static int prepare_restrict_fs_bpf(struct restrict_fs_bpf **ret_obj) {
         r = restrict_fs_bpf__load(obj);
         assert(r <= 0);
         if (r < 0)
-                return log_error_errno(r, "Failed to load BPF object");
+                return log_error_errno(r, "Failed to load BPF object: %m");
 
         *ret_obj = TAKE_PTR(obj);
 
index 18d58c308c059739ad77ead396c520dbe6488a9b..490e42b0143ca324fe6681a568a78e67b19de0f5 100644 (file)
@@ -556,7 +556,7 @@ static int run(int argc, char *argv[]) {
                                         return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Parent already died?");
 
                                 if (kill(parent, SIGUSR2) < 0)
-                                        return log_error_errno(errno, "Failed to kill our own parent.");
+                                        return log_error_errno(errno, "Failed to kill our own parent: %m");
                         }
                 }
 
index aa16582d9e4f3d0cf239b30410c257e9bdacb0af..e29d4df6925646de329022bb9fe1b023eb09f08d 100644 (file)
@@ -127,7 +127,7 @@ static int run(int argc, char *argv[]) {
 
         r = query_volatile_mode(&m);
         if (r < 0)
-                return log_error_errno(r, "Failed to determine volatile mode from kernel command line.");
+                return log_error_errno(r, "Failed to determine volatile mode from kernel command line: %m");
         if (r == 0 && argc >= 2) {
                 /* The kernel command line always wins. However if nothing was set there, the argument passed here wins instead. */
                 m = volatile_mode_from_string(argv[1]);