sparc: fix partition probe, try two partitions

If the size of the partition currently being probed is zero,
fail the probe. This lets Forth code try the next candidate from
boot-device list.

Add explicit ':d' (Sparc32, 'f' for Sparc64) partition to
CDROM probe list, so we can remove the ugly forced partition logic.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@846 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-08-09 19:21:22 +00:00
parent 96e9cbe4c4
commit 1042f8af0f
3 changed files with 6 additions and 6 deletions

View File

@@ -175,10 +175,6 @@ sunparts_open( sunparts_info_t *di )
__be32_to_cpu(p->partitions[i].num_sectors),
__be16_to_cpu(p->infos[i].id),
__be16_to_cpu(p->infos[i].flags));
if (parnum < 0) {
if (p->partitions[i].num_sectors != 0 && p->infos[i].id != 0)
parnum = i;
}
}
if (parnum < 0)
@@ -192,6 +188,10 @@ sunparts_open( sunparts_info_t *di )
di->offs_hi = offs >> BITS;
di->offs_lo = offs & (ucell) -1;
size = (long long)__be32_to_cpu(p->partitions[parnum].num_sectors) * bs;
if (size == 0) {
DPRINTF("Partition size is 0, exiting\n");
RET(0);
}
di->size_hi = size >> BITS;
di->size_lo = size & (ucell) -1;
di->type = __be16_to_cpu(p->infos[parnum].id);