]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: use SYNTHETIC_ERRNO() where appropriate
authorLennart Poettering <lennart@poettering.net>
Mon, 28 Jan 2019 18:30:30 +0000 (19:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2019 11:41:32 +0000 (12:41 +0100)
src/systemctl/systemctl.c

index bca1b79bab3529779663b717d2ce5fd83e217f2e..f79121bc24ff0cb22e28daa4376975bee16f637a 100644 (file)
@@ -3538,10 +3538,9 @@ static int load_kexec_kernel(void) {
                 /* But it logs about all these cases, hence don't log here again */
                 return r;
 
-        if (strv_length(e->initrd) > 1) {
-                log_error("Boot entry specifies multiple initrds, which is not supported currently.");
-                return -EINVAL;
-        }
+        if (strv_length(e->initrd) > 1)
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "Boot entry specifies multiple initrds, which is not supported currently.");
 
         kernel = path_join(e->root, e->kernel);
         if (!strv_isempty(e->initrd))