From 511710d68f477e0210ae1830769e5d0cde4ea36a Mon Sep 17 00:00:00 2001 From: cwu11 Date: Fri, 3 Nov 2006 02:47:43 +0000 Subject: =?UTF-8?q?1.=09Add=20the=20fix=20for=20the=20following=20Bugs:=20?= =?UTF-8?q?i)=09BMM=5FFAKE=5FNV=5FDATA=20definition=20inconsistent=20in=20?= =?UTF-8?q?bm.vfr=20and=20BootMain.h=20=20=20=20=20=20=20=20=20(EdkNt32Pkg?= =?UTF-8?q?\Dxe\PlatformBdsDxe\Generic\BootMaint\BootMain.h)=20ii)=09Chang?= =?UTF-8?q?e=20some=20files=E2=80=99=20EOL(end=20of=20line)=20format=20to?= =?UTF-8?q?=20DOS.=20Some=20file=20use=20even=20mixed=20style=20EOL.=20=20?= =?UTF-8?q?=20=20(EdkModulePkg\Universal\DevicePath\Dxe\DevicePath.c,=20De?= =?UTF-8?q?vicepathFromText.c,=20DevicePathUtilities.c;=20EdkModulePkg\Uni?= =?UTF-8?q?versal\Disk\DiskIo\Dxe\diskIo.c;=20MdePkg\Library\UefiLib\UefiN?= =?UTF-8?q?otTiano.c)=20iii)=20=20=20=20Change=20some=20illegal=20characte?= =?UTF-8?q?rs=20in=20many=20files,=20the=20problem=20is=20mainly=20connect?= =?UTF-8?q?ed=20with=20people=20using=20Chinese=20Input=20method=20to=20in?= =?UTF-8?q?put=20symbols=20such=20as=20'=20"=20-=20=3F,=20etc.=20Multiple?= =?UTF-8?q?=20files=20are=20influenced.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1890 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/DevicePath/Dxe/DevicePathUtilities.c | 422 ++++++++++----------- 1 file changed, 211 insertions(+), 211 deletions(-) (limited to 'EdkModulePkg/Universal/DevicePath/Dxe/DevicePathUtilities.c') diff --git a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathUtilities.c b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathUtilities.c index a702595225..548a5349a8 100644 --- a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathUtilities.c +++ b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathUtilities.c @@ -1,211 +1,211 @@ -/*++ - -Copyright (c) 2006, Intel Corporation -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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -Module Name: - - DevicePathUtilities.c - -Abstract: - - Implementation file for Device Path Utilities Protocol - ---*/ - -#include "DevicePath.h" - -UINTN -GetDevicePathSizeProtocolInterface ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -/*++ - - Routine Description: - Returns the size of the device path, in bytes. - - Arguments: - DevicePath - Points to the start of the EFI device path. - - Returns: - Size - Size of the specified device path, in bytes, including the end-of-path tag. - ---*/ -{ - return GetDevicePathSize (DevicePath); -} - -EFI_DEVICE_PATH_PROTOCOL * -DuplicateDevicePathProtocolInterface ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -/*++ - - Routine Description: - Create a duplicate of the specified path. - - Arguments: - DevicePath - Points to the source EFI device path. - - Returns: - Pointer - A pointer to the duplicate device path. - NULL - Insufficient memory. - ---*/ -{ - return DuplicateDevicePath (DevicePath); -} - -EFI_DEVICE_PATH_PROTOCOL * -AppendDevicePathProtocolInterface ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1, - IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2 - ) -/*++ - - Routine Description: - Create a new path by appending the second device path to the first. - - Arguments: - Src1 - Points to the first device path. If NULL, then it is ignored. - Src2 - Points to the second device path. If NULL, then it is ignored. - - Returns: - Pointer - A pointer to the newly created device path. - NULL - Memory could not be allocated - or either DevicePath or DeviceNode is NULL. - ---*/ -{ - return AppendDevicePath (Src1, Src2); -} - -EFI_DEVICE_PATH_PROTOCOL * -AppendDeviceNodeProtocolInterface ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode - ) -/*++ - - Routine Description: - Creates a new path by appending the device node to the device path. - - Arguments: - DevicePath - Points to the device path. - DeviceNode - Points to the device node. - - Returns: - Pointer - A pointer to the allocated device node. - NULL - Memory could not be allocated - or either DevicePath or DeviceNode is NULL. - ---*/ -{ - return AppendDevicePathNode (DevicePath, DeviceNode); -} - -EFI_DEVICE_PATH_PROTOCOL * -AppendDevicePathInstanceProtocolInterface ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance - ) -/*++ - - Routine Description: - Creates a new path by appending the specified device path instance to the specified device path. - - Arguments: - DevicePath - Points to the device path. If NULL, then ignored. - DevicePathInstance - Points to the device path instance. - - Returns: - Pointer - A pointer to the newly created device path - NULL - Memory could not be allocated or DevicePathInstance is NULL. - ---*/ -{ - return AppendDevicePathInstance (DevicePath, DevicePathInstance); -} - -EFI_DEVICE_PATH_PROTOCOL * -GetNextDevicePathInstanceProtocolInterface ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance, - OUT UINTN *DevicePathInstanceSize - ) -/*++ - - Routine Description: - Creates a copy of the current device path instance and returns a pointer to the next device path instance. - - Arguments: - DevicePathInstance - On input, this holds the pointer to the current device path - instance. On output, this holds the pointer to the next - device path instance or NULL if there are no more device - path instances in the device path. - DevicePathInstanceSize - On output, this holds the size of the device path instance, - in bytes or zero, if DevicePathInstance is zero. - - Returns: - Pointer - A pointer to the copy of the current device path instance. - NULL - DevicePathInstace was NULL on entry or there was insufficient memory. - ---*/ -{ - return GetNextDevicePathInstance (DevicePathInstance, DevicePathInstanceSize); -} - -BOOLEAN -IsDevicePathMultiInstanceProtocolInterface ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -/*++ - - Routine Description: - Returns whether a device path is multi-instance. - - Arguments: - DevicePath - Points to the device path. If NULL, then ignored. - - Returns: - TRUE - The device path has more than one instance - FALSE - The device path is empty or contains only a single instance. - ---*/ -{ - return IsDevicePathMultiInstance (DevicePath); -} - -EFI_DEVICE_PATH_PROTOCOL * -CreateDeviceNodeProtocolInterface ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength - ) -/*++ - - Routine Description: - Creates a device node - - Arguments: - NodeType - NodeType is the device node type (EFI_DEVICE_PATH.Type) for - the new device node. - NodeSubType - NodeSubType is the device node sub-type - EFI_DEVICE_PATH.SubType) for the new device node. - NodeLength - NodeLength is the length of the device node - (EFI_DEVICE_PATH.Length) for the new device node. - - Returns: - Pointer - A pointer to the newly created device node. - NULL - NodeLength is less than - the size of the header or there was insufficient memory. - ---*/ -{ - return CreateDeviceNode (NodeType, NodeSubType, NodeLength); -} +/*++ + +Copyright (c) 2006, Intel Corporation +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 +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Module Name: + + DevicePathUtilities.c + +Abstract: + + Implementation file for Device Path Utilities Protocol + +--*/ + +#include "DevicePath.h" + +UINTN +GetDevicePathSizeProtocolInterface ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +/*++ + + Routine Description: + Returns the size of the device path, in bytes. + + Arguments: + DevicePath - Points to the start of the EFI device path. + + Returns: + Size - Size of the specified device path, in bytes, including the end-of-path tag. + +--*/ +{ + return GetDevicePathSize (DevicePath); +} + +EFI_DEVICE_PATH_PROTOCOL * +DuplicateDevicePathProtocolInterface ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +/*++ + + Routine Description: + Create a duplicate of the specified path. + + Arguments: + DevicePath - Points to the source EFI device path. + + Returns: + Pointer - A pointer to the duplicate device path. + NULL - Insufficient memory. + +--*/ +{ + return DuplicateDevicePath (DevicePath); +} + +EFI_DEVICE_PATH_PROTOCOL * +AppendDevicePathProtocolInterface ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1, + IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2 + ) +/*++ + + Routine Description: + Create a new path by appending the second device path to the first. + + Arguments: + Src1 - Points to the first device path. If NULL, then it is ignored. + Src2 - Points to the second device path. If NULL, then it is ignored. + + Returns: + Pointer - A pointer to the newly created device path. + NULL - Memory could not be allocated + or either DevicePath or DeviceNode is NULL. + +--*/ +{ + return AppendDevicePath (Src1, Src2); +} + +EFI_DEVICE_PATH_PROTOCOL * +AppendDeviceNodeProtocolInterface ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode + ) +/*++ + + Routine Description: + Creates a new path by appending the device node to the device path. + + Arguments: + DevicePath - Points to the device path. + DeviceNode - Points to the device node. + + Returns: + Pointer - A pointer to the allocated device node. + NULL - Memory could not be allocated + or either DevicePath or DeviceNode is NULL. + +--*/ +{ + return AppendDevicePathNode (DevicePath, DeviceNode); +} + +EFI_DEVICE_PATH_PROTOCOL * +AppendDevicePathInstanceProtocolInterface ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance + ) +/*++ + + Routine Description: + Creates a new path by appending the specified device path instance to the specified device path. + + Arguments: + DevicePath - Points to the device path. If NULL, then ignored. + DevicePathInstance - Points to the device path instance. + + Returns: + Pointer - A pointer to the newly created device path + NULL - Memory could not be allocated or DevicePathInstance is NULL. + +--*/ +{ + return AppendDevicePathInstance (DevicePath, DevicePathInstance); +} + +EFI_DEVICE_PATH_PROTOCOL * +GetNextDevicePathInstanceProtocolInterface ( + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance, + OUT UINTN *DevicePathInstanceSize + ) +/*++ + + Routine Description: + Creates a copy of the current device path instance and returns a pointer to the next device path instance. + + Arguments: + DevicePathInstance - On input, this holds the pointer to the current device path + instance. On output, this holds the pointer to the next + device path instance or NULL if there are no more device + path instances in the device path. + DevicePathInstanceSize - On output, this holds the size of the device path instance, + in bytes or zero, if DevicePathInstance is zero. + + Returns: + Pointer - A pointer to the copy of the current device path instance. + NULL - DevicePathInstace was NULL on entry or there was insufficient memory. + +--*/ +{ + return GetNextDevicePathInstance (DevicePathInstance, DevicePathInstanceSize); +} + +BOOLEAN +IsDevicePathMultiInstanceProtocolInterface ( + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +/*++ + + Routine Description: + Returns whether a device path is multi-instance. + + Arguments: + DevicePath - Points to the device path. If NULL, then ignored. + + Returns: + TRUE - The device path has more than one instance + FALSE - The device path is empty or contains only a single instance. + +--*/ +{ + return IsDevicePathMultiInstance (DevicePath); +} + +EFI_DEVICE_PATH_PROTOCOL * +CreateDeviceNodeProtocolInterface ( + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength + ) +/*++ + + Routine Description: + Creates a device node + + Arguments: + NodeType - NodeType is the device node type (EFI_DEVICE_PATH.Type) for + the new device node. + NodeSubType - NodeSubType is the device node sub-type + EFI_DEVICE_PATH.SubType) for the new device node. + NodeLength - NodeLength is the length of the device node + (EFI_DEVICE_PATH.Length) for the new device node. + + Returns: + Pointer - A pointer to the newly created device node. + NULL - NodeLength is less than + the size of the header or there was insufficient memory. + +--*/ +{ + return CreateDeviceNode (NodeType, NodeSubType, NodeLength); +} -- cgit v1.2.3