X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fpartition.c;h=4381770fcca5facc0171fc52308b273478235608;hp=0cb8ae85f1768bb7aef755c6ef37f64b64f5f168;hb=3cbe90093acba116c5fc46beaf50f74c7c8a1b69;hpb=3a57377b5279a98ad98ef4b535eb0516099bc737 diff --git a/second/partition.c b/second/partition.c index 0cb8ae8..4381770 100644 --- a/second/partition.c +++ b/second/partition.c @@ -40,6 +40,7 @@ #include "linux/iso_fs.h" #include "debug.h" #include "errors.h" +#include "bootinfo.h" #include "byteorder.h" /* We currently don't check the partition type, some users @@ -286,7 +287,7 @@ partition_amiga_lookup( const char *dev_name, prom_handle disk, for (i=0; i < possible; i++) used[i] = 0; - for (part = amiga_block[AMIGA_PARTITIONS], partition = 0; + for (part = amiga_block[AMIGA_PARTITIONS], partition = 1; part != AMIGA_END; part = amiga_block[AMIGA_PART_NEXT], partition++) { @@ -337,7 +338,8 @@ partitions_lookup(const char *device) unsigned int prom_blksize, iso_root_block; strncpy(block_buffer, device, 2040); - strcat(block_buffer, ":0"); + if (_machine != _MACH_bplan) + strcat(block_buffer, ":0"); /* Open device */ disk = prom_open(block_buffer); @@ -398,7 +400,8 @@ get_part_type(char *device, int partition) struct partition_t* found; char *type = NULL; - if (prom_get_devtype(device) != FILE_DEVICE_BLOCK) + int device_kind = prom_get_devtype(device); + if (device_kind != FILE_DEVICE_BLOCK && device_kind != FILE_DEVICE_ISCSI) return NULL; parts = partitions_lookup(device);