X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fpartition.c;h=eb383bcde281f71f198be480dc6e19df4b4ebfb3;hp=9a7fe7394b683e2e8113852c8a105c4ae3a189f3;hb=0298b541149eca4c30749085694526a0040d0982;hpb=082b8310e3f92ea8da0b7011549bd86c9fd4ce95 diff --git a/second/partition.c b/second/partition.c index 9a7fe73..eb383bc 100644 --- a/second/partition.c +++ b/second/partition.c @@ -287,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,12 +337,12 @@ partitions_lookup(const char *device) struct partition_t* list = NULL; unsigned int prom_blksize, iso_root_block; - strncpy(block_buffer, device, 2040); + strncpy((char *)block_buffer, device, 2040); if (_machine != _MACH_bplan) - strcat(block_buffer, ":0"); + strcat((char *)block_buffer, ":0"); /* Open device */ - disk = prom_open(block_buffer); + disk = prom_open((char *)block_buffer); if (disk == NULL) { prom_printf("Can't open device <%s>\n", block_buffer); goto bail; @@ -400,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);