]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: log correct error about device_path_make_canonical()
authorMike Yuan <me@yhndnzj.com>
Fri, 23 Jun 2023 14:52:17 +0000 (22:52 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 23 Jun 2023 15:57:49 +0000 (23:57 +0800)
src/boot/bootctl.c

index 36ca830f8a3c44923bb39cac548e38118f5759b9..160cf83ce6a6df8c1b7219971a23bdd17f065a67 100644 (file)
@@ -479,7 +479,9 @@ static int run(int argc, char *argv[]) {
 
                 r = device_path_make_canonical(S_IFBLK, devno, &path);
                 if (r < 0)
-                        return log_oom();
+                        return log_error_errno(r,
+                                               "Failed to format canonical device path for devno '" DEVNUM_FORMAT_STR "': %m",
+                                               DEVNUM_FORMAT_VAL(devno));
 
                 puts(path);
                 return 0;