[OpenBIOS] [commit] r1072 - trunk/openbios-devel/packages

repository service svn at openbios.org
Sat Nov 24 15:43:09 CET 2012


Author: mcayland
Date: Sat Nov 24 15:43:09 2012
New Revision: 1072
URL: http://tracker.coreboot.org/trac/openbios/changeset/1072

Log:
Fix dir cd:,\ (no partition specified) when reading from Mac partitions.

The existing checks in mac-parts,c were wrong; regardless of whether or not we
have an argument string specified, if a partition is not specified then we
must still search for the first valid partition.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/packages/mac-parts.c

Modified: trunk/openbios-devel/packages/mac-parts.c
==============================================================================
--- trunk/openbios-devel/packages/mac-parts.c	Sat Nov 24 15:43:06 2012	(r1071)
+++ trunk/openbios-devel/packages/mac-parts.c	Sat Nov 24 15:43:09 2012	(r1072)
@@ -140,7 +140,7 @@
 	 * Implement partition selection as per the PowerPC Microprocessor CHRP bindings
 	 */
 
-	if (str == NULL || parnum == 0) {
+	if (parnum == 0) {
 		/* According to the spec, partition 0 as well as no arguments means the whole disk */
 		offs = (long long)0;
 		size = (long long)__be32_to_cpu(dmap.sbBlkCount) * bs;
@@ -156,12 +156,11 @@
 		ret = -1;
 		goto out;
 
-	} else if (parnum == -1 && strlen(argstr)) {
+	} else if (parnum == -1) {
 
 		DPRINTF("mac-parts: counted %d partitions\n", __be32_to_cpu(par.pmMapBlkCnt));
 
-		/* No partition was explicitly requested, but an argstr was passed in.
-		   So let's find a suitable partition... */
+		/* No partition was explicitly requested so let's find a suitable partition... */
 		for (parnum = 1; parnum <= __be32_to_cpu(par.pmMapBlkCnt); parnum++) {
 			SEEK( bs * parnum );
 			READ( &par, sizeof(par) );



More information about the OpenBIOS mailing list