<command>kernel-install</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain">inspect</arg>
+ <arg choice="opt"><replaceable>KERNEL-IMAGE</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
</listitem>
</varlistentry>
<varlistentry>
- <term><command>inspect</command></term>
+ <term><command>inspect [<replaceable>KERNEL-IMAGE</replaceable>]</command></term>
<listitem>
<para>Shows the various paths and parameters configured or auto-detected. In particular shows the
values of the various <varname>$KERNEL_INSTALL_*</varname> environment variables listed
return log_oom();
} else if (c->action == ACTION_INSPECT) {
- r = strv_extend(&a, "[KERNEL_IMAGE]");
+ r = strv_extend(&a, c->kernel ?: "[KERNEL_IMAGE]");
if (r < 0)
return log_oom();
c->action = ACTION_INSPECT;
+ if (argc >= 2) {
+ r = context_set_kernel(c, argv[1]);
+ if (r < 0)
+ return r;
+ }
+
r = context_prepare_execution(c);
if (r < 0)
return r;
"\nUsage:\n"
" %1$s [OPTIONS...] add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE...]\n"
" %1$s [OPTIONS...] remove KERNEL-VERSION\n"
- " %1$s [OPTIONS...] inspect\n"
+ " %1$s [OPTIONS...] inspect [KERNEL-IMAGE]\n"
"\nOptions:\n"
" -h --help Show this help\n"
" --version Show package version\n"
static const Verb verbs[] = {
{ "add", 3, VERB_ANY, 0, verb_add },
{ "remove", 2, 2, 0, verb_remove },
- { "inspect", 1, 1, VERB_DEFAULT, verb_inspect },
+ { "inspect", 1, 2, VERB_DEFAULT, verb_inspect },
{}
};
_cleanup_(context_done) Context c = {