summaryrefslogtreecommitdiff
path: root/src/boot/bootctl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2023-01-16 18:58:21 +0100
committerGerd Hoffmann <kraxel@redhat.com>2023-01-18 14:32:14 +0100
commit53c368d71ba43da7414ac86c58291a11da05ba84 (patch)
treee0e387f36cd2ea24c483441868bdd495b35e2238 /src/boot/bootctl.c
parentab250890c0483fab4ff78591e6c178b7c2257337 (diff)
downloadsystemd-53c368d71ba43da7414ac86c58291a11da05ba84.tar.gz
bootctl: add kernel-identity command
The command takes a kernel as argument and checks what kind of kernel the image is. Returns one of uki, pe or unknown.
Diffstat (limited to 'src/boot/bootctl.c')
-rw-r--r--src/boot/bootctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index b443f9970b..901533cf09 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -9,6 +9,7 @@
#include "bootctl-set-efivar.h"
#include "bootctl-status.h"
#include "bootctl-systemd-efi-options.h"
+#include "bootctl-uki.h"
#include "build.h"
#include "dissect-image.h"
#include "escape.h"
@@ -150,6 +151,8 @@ static int help(int argc, char *argv[], void *userdata) {
" remove Remove systemd-boot from the ESP and EFI variables\n"
" is-installed Test whether systemd-boot is installed in the ESP\n"
" random-seed Initialize random seed in ESP and EFI variables\n"
+ "\n%3$skernel Commands:%4$s\n"
+ " kernel-identify Identify kernel image type.\n"
"\n%3$sOptions:%4$s\n"
" -h --help Show this help\n"
" --version Print version\n"
@@ -406,6 +409,7 @@ static int bootctl_main(int argc, char *argv[]) {
{ "update", VERB_ANY, 1, 0, verb_install },
{ "remove", VERB_ANY, 1, 0, verb_remove },
{ "is-installed", VERB_ANY, 1, 0, verb_is_installed },
+ { "kernel-identify", 2, 2, 0, verb_kernel_identify },
{ "list", VERB_ANY, 1, 0, verb_list },
{ "set-default", 2, 2, 0, verb_set_efivar },
{ "set-oneshot", 2, 2, 0, verb_set_efivar },