]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
kern/efi/efi: Print VLAN info in EFI device path
authorChad Kimes <chkimes@github.com>
Mon, 21 Mar 2022 22:07:31 +0000 (18:07 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 20 Apr 2022 11:58:13 +0000 (13:58 +0200)
Signed-off-by: Chad Kimes <chkimes@github.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/kern/efi/efi.c
include/grub/efi/api.h

index 40434ee9d7dbb9c2ef51ab9c31b0a90d7b24b908..e8a976a22f155920e085f26f522a730bd8410fef 100644 (file)
@@ -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",
index 86db9699492955efa79818ec7b4c6769a7f7d1cd..d4cadd8b5ac3f32008a7683cad78b29c44d6d9a9 100644 (file)
@@ -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.  */