grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 1/2] Print VLAN info in EFI device path


From: Chad Kimes
Subject: [PATCH v2 1/2] Print VLAN info in EFI device path
Date: Mon, 21 Mar 2022 18:07:31 -0400

Signed-off-by: Chad Kimes <chkimes@github.com>
---
 grub-core/kern/efi/efi.c | 7 +++++++
 include/grub/efi/api.h   | 9 +++++++++
 2 files changed, 16 insertions(+)

diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 18858c327..d60a0b3e6 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 6c8d06e15..b8ec19aab 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -903,6 +903,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.  */
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]