[OpenBIOS] [PATCH 09/11] pc-parts: allow successful detection of PReP boot partitions

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sat May 26 21:29:54 CEST 2018


The PReP boot partition has its own separate layout, so if we detect a PReP
partition then assume success without attempting the filesystem probe (which
is always going to fail).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 packages/pc-parts.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/packages/pc-parts.c b/packages/pc-parts.c
index 771923e..dbbb2d4 100644
--- a/packages/pc-parts.c
+++ b/packages/pc-parts.c
@@ -164,6 +164,11 @@ pcparts_open( pcparts_info_t *di )
 
 		DPRINTF("Primary partition at sector %x\n", __le32_to_cpu(p->start_sect));
 
+		/* If PReP boot partition, exit immediately with no filesystem probe */
+		if (p->type == 0x41) {
+			RET(-1);
+		}
+
 		found = 1;
 	} else {
 		/* Extended partition */
@@ -220,6 +225,11 @@ pcparts_open( pcparts_info_t *di )
 				di->size_hi = size >> BITS;
 				di->size_lo = size & (ucell) -1;
 
+				/* If PReP boot partition, exit immediately with no filesystem probe */
+				if (p->type == 0x41) {
+					RET(-1);
+				}
+
 				found = 1;
 				break;
 			}
-- 
2.11.0




More information about the OpenBIOS mailing list