summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
diff options
context:
space:
mode:
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-12 10:40:58 +0000
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-12 10:40:58 +0000
commit8f97f911542444e910338cdd54e56c3da0602b54 (patch)
tree98dc5f72f2ec940eaf19402a34f88a274846e4aa /MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
parent3393e2915afe9c69a342e8fd08c32e5e41530afd (diff)
downloadedk2-8f97f911542444e910338cdd54e56c3da0602b54.zip
edk2-8f97f911542444e910338cdd54e56c3da0602b54.tar.gz
edk2-8f97f911542444e910338cdd54e56c3da0602b54.tar.bz2
1. Add UEFI 2.2 VLAN device path definition to MdePkg
2. Update DevicePathDxe to support VLAN device path node 3. Update GenericBdsLib function DevicePathToStr() to support VLAN device path node git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9421 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c')
-rw-r--r--MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
index 73ec7a7..3da549f 100644
--- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
+++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
@@ -1,7 +1,7 @@
/** @file
DevicePathFromText protocol as defined in the UEFI 2.0 specification.
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+Copyright (c) 2006 - 2009, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2350,6 +2350,34 @@ DevPathFromTextiSCSI (
}
/**
+ Converts a text device path node to VLAN device path structure.
+
+ @param TextDeviceNode The input Text device path node.
+
+ @return A pointer to the newly-created VLAN device path structure.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+DevPathFromTextVlan (
+ IN CHAR16 *TextDeviceNode
+ )
+{
+ CHAR16 *VlanStr;
+ VLAN_DEVICE_PATH *Vlan;
+
+ VlanStr = GetNextParamStr (&TextDeviceNode);
+ Vlan = (VLAN_DEVICE_PATH *) CreateDeviceNode (
+ MESSAGING_DEVICE_PATH,
+ MSG_VLAN_DP,
+ sizeof (VLAN_DEVICE_PATH)
+ );
+
+ Vlan->VlanId = (UINT16) Strtoi (VlanStr);
+
+ return (EFI_DEVICE_PATH_PROTOCOL *) Vlan;
+}
+
+/**
Converts a text device path node to HD device path structure.
@param TextDeviceNode The input Text device path node.
@@ -2753,6 +2781,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE DevPathFromTextTable[]
{L"UsbWwid", DevPathFromTextUsbWwid},
{L"Unit", DevPathFromTextUnit},
{L"iSCSI", DevPathFromTextiSCSI},
+ {L"Vlan", DevPathFromTextVlan},
{L"HD", DevPathFromTextHD},
{L"CDROM", DevPathFromTextCDROM},
{L"VenMEDIA", DevPathFromTextVenMEDIA},