mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
systemctl: be careful with boot loader entries lacking a 'linux' line
A boot loader entry might not have a 'linux' line, but an 'efi' line or something else. Let's handle that case nicely.
This commit is contained in:
@@ -3539,6 +3539,9 @@ static int load_kexec_kernel(void) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (!e->kernel)
|
||||
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),
|
||||
"Boot entry specifies multiple initrds, which is not supported currently.");
|
||||
|
||||
Reference in New Issue
Block a user