mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-05 11:29:41 +00:00
display driver type, correct driver signature
This commit is contained in:
parent
da8b04e3b4
commit
e101bf5337
@ -130,9 +130,28 @@ void diskinfo(char* device)
|
|||||||
int block, size, type, part;
|
int block, size, type, part;
|
||||||
emile_map_get_driver_info(map, j,
|
emile_map_get_driver_info(map, j,
|
||||||
&block, &size, &type);
|
&block, &size, &type);
|
||||||
printf(" %d: base: %d size: %d type: 0x%04x",
|
printf(" %d: base: %d size: %d ",
|
||||||
j, block * block_size / 512,
|
j, block * block_size / 512,
|
||||||
size * block_size / 512, type);
|
size * block_size / 512);
|
||||||
|
printf("type: ");
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
case kDriverTypeMacSCSI:
|
||||||
|
printf("SCSI");
|
||||||
|
break;
|
||||||
|
case kDriverTypeMacATA:
|
||||||
|
printf("ATA");
|
||||||
|
break;
|
||||||
|
case kDriverTypeMacSCSIChained:
|
||||||
|
printf("SCSI chained");
|
||||||
|
break;
|
||||||
|
case kDriverTypeMacATAChained:
|
||||||
|
printf("ATA chained\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("unknown (%04x)\n", type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
part = emile_map_seek_driver_partition(map,
|
part = emile_map_seek_driver_partition(map,
|
||||||
block * block_size / 512);
|
block * block_size / 512);
|
||||||
if (part == -1)
|
if (part == -1)
|
||||||
@ -142,9 +161,6 @@ void diskinfo(char* device)
|
|||||||
if (part == -1)
|
if (part == -1)
|
||||||
printf(" <invalid>\n");
|
printf(" <invalid>\n");
|
||||||
emile_map_read(map, part);
|
emile_map_read(map, part);
|
||||||
printf(" <%d: %s [%s]>\n", part + 1,
|
|
||||||
emile_map_get_partition_name(map),
|
|
||||||
emile_map_get_partition_type(map));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -157,6 +173,7 @@ void diskinfo(char* device)
|
|||||||
printf(" <invalid>\n");
|
printf(" <invalid>\n");
|
||||||
emile_map_read(map, part);
|
emile_map_read(map, part);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
printf(" <%d: %s [%s], ", part + 1,
|
printf(" <%d: %s [%s], ", part + 1,
|
||||||
emile_map_get_partition_name(map),
|
emile_map_get_partition_name(map),
|
||||||
emile_map_get_partition_type(map));
|
emile_map_get_partition_type(map));
|
||||||
@ -186,7 +203,6 @@ void diskinfo(char* device)
|
|||||||
}
|
}
|
||||||
printf(">\n");
|
printf(">\n");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
printf(" Partitions\n");
|
printf(" Partitions\n");
|
||||||
for (j = 0; j < emile_map_get_number(map); j++)
|
for (j = 0; j < emile_map_get_number(map); j++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user