\r
#pragma pack()\r
\r
-#define EFI_DP_TYPE_MASK 0x7F\r
-#define EFI_DP_TYPE_UNPACKED 0x80\r
#define END_DEVICE_PATH_TYPE 0x7f\r
- \r
-#define EFI_END_ENTIRE_DEVICE_PATH 0xff\r
-#define EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff\r
-#define EFI_END_INSTANCE_DEVICE_PATH 0x01\r
-#define END_ENTIRE_DEVICE_PATH_SUBTYPE EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE\r
-#define END_INSTANCE_DEVICE_PATH_SUBTYPE EFI_END_INSTANCE_DEVICE_PATH\r
- \r
-#define EFI_END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))\r
-#define END_DEVICE_PATH_LENGTH EFI_END_DEVICE_PATH_LENGTH\r
- \r
-#define DP_IS_END_TYPE(a) \r
-#define DP_IS_END_SUBTYPE(a) (((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE)\r
-#define DevicePathSubType(a) ((a)->SubType)\r
-#define IsDevicePathUnpacked(a) ((a)->Type & EFI_DP_TYPE_UNPACKED)\r
- \r
-#define EfiDevicePathNodeLength(a) (((a)->Length[0]) | ((a)->Length[1] << 8))\r
-#define DevicePathNodeLength(a) (EfiDevicePathNodeLength(a))\r
-#define EfiNextDevicePathNode(a) ((EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *) (a)) + EfiDevicePathNodeLength (a)))\r
-#define NextDevicePathNode(a) (EfiNextDevicePathNode(a)) \r
- \r
-#define EfiDevicePathType(a) (((a)->Type) & EFI_DP_TYPE_MASK)\r
-#define DevicePathType(a) (EfiDevicePathType(a))\r
-#define EfiIsDevicePathEndType(a) (EfiDevicePathType (a) == END_DEVICE_PATH_TYPE)\r
-#define IsDevicePathEndType(a) (EfiIsDevicePathEndType(a)) \r
- \r
- \r
-#define EfiIsDevicePathEndSubType(a) ((a)->SubType == EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)\r
-#define IsDevicePathEndSubType(a) (EfiIsDevicePathEndSubType(a))\r
-#define EfiIsDevicePathEndInstanceSubType(a) ((a)->SubType == EFI_END_INSTANCE_DEVICE_PATH)\r
- \r
-#define EfiIsDevicePathEnd(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndSubType (a))\r
-#define IsDevicePathEnd(a) (EfiIsDevicePathEnd(a))\r
-#define EfiIsDevicePathEndInstance(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndInstanceSubType (a))\r
-\r
-\r
-#define SetDevicePathNodeLength(a,l) { \\r
- (a)->Length[0] = (UINT8) (l); \\r
- (a)->Length[1] = (UINT8) ((l) >> 8); \\r
- }\r
-\r
-#define SetDevicePathEndNode(a) { \\r
- (a)->Type = END_DEVICE_PATH_TYPE; \\r
- (a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \\r
- (a)->Length[0] = sizeof(EFI_DEVICE_PATH_PROTOCOL); \\r
- (a)->Length[1] = 0; \\r
- }\r
+#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF\r
+#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01\r
\r
extern EFI_GUID gEfiDevicePathProtocolGuid;\r
\r