All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chad Kimes <chkimes@github.com>
To: grub-devel@gnu.org
Cc: Chad Kimes <chkimes@github.com>
Subject: [PATCH 1/2] Print VLAN info in EFI device path
Date: Sat,  5 Mar 2022 19:46:39 -0500	[thread overview]
Message-ID: <20220306004640.412289-1-chkimes@github.com> (raw)

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	other threads:[~2022-03-06  0:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06  0:46 Chad Kimes [this message]
2022-03-06  0:46 ` [PATCH 2/2] Configure VLAN from UEFI device used for PXE Chad Kimes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220306004640.412289-1-chkimes@github.com \
    --to=chkimes@github.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.