static void
add_new_partition(struct partition_t** list, int part_number, const char *part_type,
const char *part_name, unsigned long part_start, unsigned long part_size,
- unsigned short part_blocksize)
+ unsigned short part_blocksize, int sys_ind)
{
struct partition_t* part;
part = (struct partition_t*)malloc(sizeof(struct partition_t));
part->part_start = part_start;
part->part_size = part_size;
part->blocksize = part_blocksize;
+ part->sys_ind = sys_ind;
/* Tack this entry onto the list */
part->next = *list;
part->name, /* name */
part->start_block + part->data_start, /* start */
part->data_count, /* size */
- ptable_block_size );
+ ptable_block_size,
+ 0);
}
}
(struct fdisk_partition *) (block_buffer + 0x1be);
for (partition=1; partition <= 4 ;partition++, part++) {
- if (part->sys_ind == LINUX_NATIVE) {
+ if (part->sys_ind == LINUX_NATIVE || part->sys_ind == LINUX_RAID) {
add_new_partition( list,
partition,
"Linux", /* type */
'\0', /* name */
swab32(*(unsigned int *)(part->start4)),
swab32(*(unsigned int *)(part->size4)),
- 512 /*blksize*/ );
+ 512 /*blksize*/,
+ part->sys_ind /* partition type */ );
}
}
}
possible = amiga_block[AMIGA_RDBLIMIT]/32 +1;
used = (unsigned int *) malloc (sizeof (unsigned int) * (possible + 1));
+ if (!used) {
+ prom_printf("Can't allocate memory\n");
+ return;
+ }
for (i=0; i < possible; i++) used[i] = 0;
'\0', /* name */
blockspercyl * amiga_block[AMIGA_PART_LOWCYL], /* start */
blockspercyl * (amiga_block[AMIGA_PART_HIGHCYL] - amiga_block[AMIGA_PART_LOWCYL] + 1), /* size */
- prom_blksize );
+ prom_blksize,
+ 0 );
}
+ if (used)
+ free(used);
}
struct partition_t*
'\0',
iso_root_block,
0,
- prom_blksize);
+ prom_blksize,
+ 0);
prom_printf("ISO9660 disk\n");
} else if (_amiga_find_rdb(device, disk, prom_blksize) != -1) {
/* amiga partition format */