[OpenBIOS] r443 - openbios-devel/modules
svn at openbios.org
svn at openbios.org
Thu Feb 5 01:16:55 CET 2009
Author: laurent
Date: 2009-02-05 01:16:54 +0100 (Thu, 05 Feb 2009)
New Revision: 443
Modified:
openbios-devel/modules/disk-label.c
Log:
Allows to use disk (like CD-ROM) without partition map but with filesystem
on the full disk. We accept partition number 0 (which identifies the full
disk) and partition number 1 (we can see the disk as only one partition).
This is needed to boot openSUSE install CD which uses
"&device;:1,\suseboot\yaboot.ibm" as its boot path.
There is a Mac partition map on the CD, but
partition 1 is the partition map itself, and thus is not usable by a filesystem.
So we can guess, openFirmware must use ISO9660 instead of HFS and thus
to not use the Mac partition map, but the whole CD for the partition #1.
Disk openSUSE-ppc.iso: 135 MB, 135593984 bytes
4 heads, 32 sectors/track, 2069 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Device Boot Start End Blocks Id System
openSUSE-ppc.iso1 1 1 48 Apple_partition_map
openSUSE-ppc.iso2 1 2066 132160 Apple_HFS
Modified: openbios-devel/modules/disk-label.c
===================================================================
--- openbios-devel/modules/disk-label.c 2009-02-05 00:05:58 UTC (rev 442)
+++ openbios-devel/modules/disk-label.c 2009-02-05 00:16:54 UTC (rev 443)
@@ -78,6 +78,21 @@
}
}
+ /* try to see if there is a filesystem without partition */
+
+ if (atol(parstr) == 0 || atol(parstr) == 1) {
+ PUSH_ih( my_self() );
+ selfword("find-filesystem");
+ ph = POP_ph();
+ if( ph ) {
+ push_str( filename );
+ PUSH_ph( ph );
+ fword("interpose");
+ success = 1;
+ goto out;
+ }
+ }
+
/* find partition handler */
seek_io( fd, 0 );
if( read_io(fd, block0, sizeof(block0)) != sizeof(block0) )
More information about the OpenBIOS
mailing list