aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Kimes <chkimes@github.com>2022-03-21 18:07:31 -0400
committerDaniel Kiper <daniel.kiper@oracle.com>2022-04-20 13:58:13 +0200
commitc143056a34b4ccc255a6ad4e96a5aa989d304760 (patch)
treed9ab1c108f98b91f21ca9fcbbe93fa3e89294544
parent954c48b9c833d64b74ced1f27701af2ea5c6f55a (diff)
downloadgrub-c143056a34b4ccc255a6ad4e96a5aa989d304760.tar.gz
kern/efi/efi: Print VLAN info in EFI device path
Signed-off-by: Chad Kimes <chkimes@github.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-rw-r--r--grub-core/kern/efi/efi.c7
-rw-r--r--include/grub/efi/api.h9
2 files changed, 16 insertions, 0 deletions
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 40434ee9d..e8a976a22 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -832,6 +832,13 @@ grub_efi_print_device_path (grub_efi_device_path_t *dp)
sata->lun);
}
break;
+ case GRUB_EFI_VLAN_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_vlan_device_path_t *vlan;
+ vlan = (grub_efi_vlan_device_path_t *) dp;
+ grub_printf ("/Vlan(%u)", vlan->vlan_id);
+ }
+ break;
case GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE:
dump_vendor_path ("Messaging",
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 86db96994..d4cadd8b5 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -908,6 +908,15 @@ struct grub_efi_sata_device_path
} GRUB_PACKED;
typedef struct grub_efi_sata_device_path grub_efi_sata_device_path_t;
+#define GRUB_EFI_VLAN_DEVICE_PATH_SUBTYPE 20
+
+struct grub_efi_vlan_device_path
+{
+ grub_efi_device_path_t header;
+ grub_efi_uint16_t vlan_id;
+} GRUB_PACKED;
+typedef struct grub_efi_vlan_device_path grub_efi_vlan_device_path_t;
+
#define GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE 10
/* Media Device Path. */