]> git.ozlabs.org Git - yaboot.git/blobdiff - second/partition.c
Treat iSCSI targets as block devices.
[yaboot.git] / second / partition.c
index 9a7fe7394b683e2e8113852c8a105c4ae3a189f3..4381770fcca5facc0171fc52308b273478235608 100644 (file)
@@ -287,7 +287,7 @@ partition_amiga_lookup( const char *dev_name, prom_handle disk,
        for (i=0; i < possible; i++) used[i] = 0;
 
 
        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++)
        {
                part != AMIGA_END;
                part = amiga_block[AMIGA_PART_NEXT], partition++)
        {
@@ -400,7 +400,8 @@ get_part_type(char *device, int partition)
      struct partition_t*       found;
      char *type = NULL;
 
      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);
          return NULL;
 
      parts = partitions_lookup(device);