Fix the swab* macros.
[yaboot.git] / second / partition.c
index d20a0ede652c08a37494cd323146c59396541b71..eb383bcde281f71f198be480dc6e19df4b4ebfb3 100644 (file)
@@ -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);