[PATCH] uefibootpath: fix the wrong type for relative offset range path

Ivan Hu ivan.hu at canonical.com
Thu Dec 3 09:17:28 UTC 2015


The relative offset range device path subtype belongs to Media device path
not Messaging device path. Move it to the right place.

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/uefi/uefibootpath/uefibootpath.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/uefi/uefibootpath/uefibootpath.c b/src/uefi/uefibootpath/uefibootpath.c
index e19f3fa..25b522b 100644
--- a/src/uefi/uefibootpath/uefibootpath.c
+++ b/src/uefi/uefibootpath/uefibootpath.c
@@ -543,16 +543,6 @@ static int uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *d
 				errors++;
 			}
 			break;
-		case FWTS_UEFI_RELATIVE_OFFSET_RANGE_SUBTYPE:
-			if (len != sizeof(fwts_relative_offset_range_path)) {
-				fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIRelativeOffsetRangeLength",
-					"The length of Relative Offset Range is %" PRIu16 " bytes "
-					"and differs from UEFI specification defined %" PRIu16 " bytes.",
-					len,
-					(uint16_t)sizeof(fwts_relative_offset_range_path));
-				errors++;
-			}
-			break;
 		case FWTS_UEFI_URI_DEVICE_PATH_SUBTYPE:
 			if (len <= sizeof(fwts_uefi_uri_dev_path)) {
 				fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIURIDevPathLength",
@@ -726,6 +716,16 @@ static int uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *d
 				errors++;
 			}
 			break;
+		case FWTS_UEFI_RELATIVE_OFFSET_RANGE_SUBTYPE:
+			if (len != sizeof(fwts_relative_offset_range_path)) {
+				fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIRelativeOffsetRangeLength",
+					"The length of Relative Offset Range is %" PRIu16 " bytes "
+					"and differs from UEFI specification defined %" PRIu16 " bytes.",
+					len,
+					(uint16_t)sizeof(fwts_relative_offset_range_path));
+				errors++;
+			}
+			break;
 		case FWTS_UEFI_RAM_DISK_SUBTYPE:
 			if (len != sizeof(fwts_ram_disk_path)) {
 				fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIRamDiskDevPathLength",
-- 
1.9.1




More information about the fwts-devel mailing list