aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2023-05-04 14:21:42 +0100
committerMichael Brown <mcb30@ipxe.org>2023-05-05 14:54:20 +0100
commitf9beb20e99abbfcbea7cf222ba692aa3cbf10df7 (patch)
tree337aef1fa6a9a454a36fd54f278db82791c69394 /src/usr
parentf93e6b712ff2beb7ea4e169a681b8144785f3e49 (diff)
downloadipxe-f9beb20e99abbfcbea7cf222ba692aa3cbf10df7.zip
ipxe-f9beb20e99abbfcbea7cf222ba692aa3cbf10df7.tar.gz
ipxe-f9beb20e99abbfcbea7cf222ba692aa3cbf10df7.tar.bz2
[image] Allow for images to be hidden from lists of all images
When invoking a kernel via the UEFI shim, the kernel (and potentially also a helper binary such as GRUB) must be accessible via the virtual filesystem exposed via EFI_SIMPLE_FILE_SYSTEM_PROTOCOL but must not be present in the magic initrd constructed from all registered images. Allow for images to be flagged as hidden, which will cause them to be excluded from API-level lists of all images such as the virtual filesystem directory contents, the magic initrd, or the Multiboot module list. Hidden images remain visible to iPXE commands including "imgstat", which will show a "[HIDDEN]" flag for such images. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/imgmgmt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/usr/imgmgmt.c b/src/usr/imgmgmt.c
index b7fc829..94f3d2c 100644
--- a/src/usr/imgmgmt.c
+++ b/src/usr/imgmgmt.c
@@ -165,6 +165,8 @@ void imgstat ( struct image *image ) {
printf ( " [SELECTED]" );
if ( image->flags & IMAGE_AUTO_UNREGISTER )
printf ( " [AUTOFREE]" );
+ if ( image->flags & IMAGE_HIDDEN )
+ printf ( " [HIDDEN]" );
if ( image->cmdline )
printf ( " \"%s\"", image->cmdline );
printf ( "\n" );