[PATCH 1/4] uefi: uefidump: add the Device Logical Unit subtype-17 support on messaging device path type for uefidump(LP: #1255387)

Ivan Hu ivan.hu at canonical.com
Thu Dec 5 10:03:50 UTC 2013


Add the Device Logical Unit subtype 17 support on messaging device path follow the section 9.3.5.8 on UEFI spec2.4.

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/lib/include/fwts_uefi.h  |    6 ++++++
 src/uefi/uefidump/uefidump.c |    6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/src/lib/include/fwts_uefi.h b/src/lib/include/fwts_uefi.h
index e953bf0..84735c2 100644
--- a/src/lib/include/fwts_uefi.h
+++ b/src/lib/include/fwts_uefi.h
@@ -205,6 +205,7 @@ typedef enum {
 	FWTS_UEFI_UART_DEVICE_PATH_SUBTYPE =		(0x0e),
 	FWTS_UEFI_USB_CLASS_DEVICE_PATH_SUBTYPE =	(0x0f),
 	FWTS_UEFI_USB_WWID_DEVICE_PATH_SUBTYPE =	(0x10),
+	FWTS_UEFI_LOGICAL_UNIT_DEVICE_PATH_SUBTYPE =	(0x11),
 	FWTS_UEFI_SATA_DEVICE_PATH_SUBTYPE = 		(0x12),
 	FWTS_UEFI_VLAN_DEVICE_PATH_SUBTYPE = 		(0x14),
 	FWTS_UEFI_FIBRE_CHANNEL_EX_DEVICE_PATH_SUBTYPE = (0x15)
@@ -399,6 +400,11 @@ typedef struct {
 
 typedef struct {
 	fwts_uefi_dev_path dev_path;
+	uint8_t lun;
+} __attribute__((packed)) fwts_uefi_logical_unit_dev_path;
+
+typedef struct {
+	fwts_uefi_dev_path dev_path;
 	uint16_t vlanid;
 } fwts_uefi_vlan_dev_path;
 
diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
index a8b9980..b39841b 100644
--- a/src/uefi/uefidump/uefidump.c
+++ b/src/uefi/uefidump/uefidump.c
@@ -378,6 +378,12 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path, c
 				path = uefidump_vprintf(path, "\\VLAN(0x%" PRIx16 ")", v->vlanid);
 			}
 			break;
+		case FWTS_UEFI_LOGICAL_UNIT_DEVICE_PATH_SUBTYPE:
+			if (dev_path_len >= sizeof(fwts_uefi_logical_unit_dev_path)) {
+				fwts_uefi_logical_unit_dev_path *l = (fwts_uefi_logical_unit_dev_path *)dev_path;
+				path = uefidump_vprintf(path, "\\DEVICELOGICALUNIT(0x%" PRIx8 ")", l->lun);
+			}
+			break;
 		default:
 			path = uefidump_vprintf(path, "\\Unknown-MESSAGING-DEV-PATH(0x%" PRIx8 ")", dev_path->subtype);
 			break;
-- 
1.7.9.5




More information about the fwts-devel mailing list