From 8a1ef3bf8d0eaea5a34911b3a34d741ef3fb4b5c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 28 Jan 2019 19:30:30 +0100 Subject: [PATCH] systemctl: use SYNTHETIC_ERRNO() where appropriate --- src/systemctl/systemctl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index bca1b79bab..f79121bc24 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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)) -- 2.25.1