]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
1. Correct File header to ## @file
[mirror_edk2.git] / MdePkg / Library / UefiDevicePathLibDevicePathProtocol / UefiDevicePathLib.c
index 08a0191c14fd0a76bf2a4e0ec9cca2f7c3c786d0..8d8fdeec5fa3054b172f0753f5ea85488c8f3ce8 100644 (file)
@@ -2,7 +2,7 @@
   Library instance that implement UEFI Device Path Library class based on protocol\r
   gEfiDevicePathUtilitiesProtocolGuid.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -17,7 +17,6 @@
 #include <Uefi.h>\r
 \r
 #include <Protocol/DevicePathUtilities.h>\r
-#include <Protocol/DevicePath.h>\r
 \r
 #include <Library/DevicePathLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -85,6 +84,7 @@ DevicePathLibConstructor (
 \r
 **/\r
 UINT8\r
+EFIAPI\r
 DevicePathType (\r
   IN CONST VOID  *Node\r
   )\r
@@ -106,6 +106,7 @@ DevicePathType (
 \r
 **/\r
 UINT8\r
+EFIAPI\r
 DevicePathSubType (\r
   IN CONST VOID  *Node\r
   )\r
@@ -130,6 +131,7 @@ DevicePathSubType (
 \r
 **/\r
 UINTN\r
+EFIAPI\r
 DevicePathNodeLength (\r
   IN CONST VOID  *Node\r
   )\r
@@ -151,6 +153,7 @@ DevicePathNodeLength (
 \r
 **/\r
 EFI_DEVICE_PATH_PROTOCOL *\r
+EFIAPI\r
 NextDevicePathNode (\r
   IN CONST VOID  *Node\r
   )\r
@@ -177,12 +180,13 @@ NextDevicePathNode (
   \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 IsDevicePathEndType (\r
   IN CONST VOID  *Node\r
   )\r
 {\r
   ASSERT (Node != NULL);\r
-  return (BOOLEAN) ((DevicePathType (Node) & 0x7f) == END_DEVICE_PATH_TYPE);\r
+  return (BOOLEAN) (DevicePathType (Node) == END_DEVICE_PATH_TYPE);\r
 }\r
 \r
 /**\r
@@ -200,6 +204,7 @@ IsDevicePathEndType (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 IsDevicePathEnd (\r
   IN CONST VOID  *Node\r
   )\r
@@ -223,6 +228,7 @@ IsDevicePathEnd (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 IsDevicePathEndInstance (\r
   IN CONST VOID  *Node\r
   )\r
@@ -249,14 +255,15 @@ IsDevicePathEndInstance (
 \r
 **/\r
 UINT16\r
+EFIAPI\r
 SetDevicePathNodeLength (\r
-  IN VOID   *Node,\r
-  IN UINTN  NodeLength\r
+  IN OUT VOID  *Node,\r
+  IN UINTN     Length\r
   )\r
 {\r
   ASSERT (Node != NULL);\r
-  ASSERT (NodeLength < 0x10000);\r
-  return WriteUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0], (UINT16)(NodeLength));\r
+  ASSERT (Length < 0x10000);\r
+  return WriteUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0], (UINT16)(Length));\r
 }\r
 \r
 /**\r
@@ -276,8 +283,9 @@ SetDevicePathNodeLength (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 SetDevicePathEndNode (\r
-  IN VOID  *Node\r
+  OUT VOID  *Node\r
   )\r
 {\r
   ASSERT (Node != NULL);\r