From: Lennart Poettering Date: Fri, 1 Mar 2019 16:47:50 +0000 (+0100) Subject: systemctl: when something is not supported use EOPNOTSUPP X-Git-Tag: v242-rc1~192^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0f88d829790c6f04c25acdea6ae4718525a1eacf;p=thirdparty%2Fsystemd.git systemctl: when something is not supported use EOPNOTSUPP --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 9be66218090..6a4e73dee4a 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3543,7 +3543,7 @@ static int load_kexec_kernel(void) { return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Boot entry does not refer to Linux kernel, which is not supported currently."); if (strv_length(e->initrd) > 1) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), + return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Boot entry specifies multiple initrds, which is not supported currently."); kernel = path_join(e->root, e->kernel); @@ -3551,7 +3551,7 @@ static int load_kexec_kernel(void) { return log_oom(); if (!strv_isempty(e->initrd)) { - initrd = path_join(e->root, *e->initrd); + initrd = path_join(e->root, e->initrd[0]); if (!initrd) return log_oom(); }