mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 11:14:39 +00:00
Rename XmlMediaType to MetadataMediaType for clarity and consistency
This commit is contained in:
@@ -818,7 +818,7 @@ typedef struct ImageInfo // NOLINT
|
||||
int64_t CreationTime; ///< Image creation time
|
||||
int64_t LastModificationTime; ///< Image last modification time
|
||||
uint32_t MediaType; ///< Media type represented by the image
|
||||
uint8_t XmlMediaType; ///< Type of the media represented by the image to use in XML sidecars
|
||||
uint8_t MetadataMediaType; ///< Type of the media represented by the image to use in XML sidecars
|
||||
} ImageInfo;
|
||||
|
||||
/** \addtogroup SectorTags Per-sector metadata tag types
|
||||
|
||||
@@ -1530,7 +1530,7 @@ static void write_sector_subchannel(const aaruformatContext *ctx)
|
||||
|
||||
subchannel_block.cmpLength = subchannel_block.length;
|
||||
|
||||
if(ctx->imageInfo.XmlMediaType == OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType == OpticalDisc)
|
||||
{
|
||||
subchannel_block.type = CdSectorSubchannel;
|
||||
subchannel_block.length =
|
||||
@@ -1579,7 +1579,7 @@ static void write_sector_subchannel(const aaruformatContext *ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(ctx->imageInfo.XmlMediaType == BlockMedia)
|
||||
else if(ctx->imageInfo.MetadataMediaType == BlockMedia)
|
||||
{
|
||||
switch(ctx->imageInfo.MediaType)
|
||||
{
|
||||
|
||||
@@ -434,7 +434,7 @@ void *aaruf_create(const char *filepath, const uint32_t media_type, const uint32
|
||||
ctx->imageInfo.ImageSize = 0;
|
||||
ctx->imageInfo.CreationTime = ctx->header.creationTime;
|
||||
ctx->imageInfo.LastModificationTime = ctx->header.lastWrittenTime;
|
||||
ctx->imageInfo.XmlMediaType = aaruf_get_xml_mediatype(ctx->header.mediaType);
|
||||
ctx->imageInfo.MetadataMediaType = aaruf_get_xml_mediatype(ctx->header.mediaType);
|
||||
ctx->imageInfo.SectorSize = sector_size;
|
||||
|
||||
// Initialize caches
|
||||
|
||||
@@ -488,9 +488,9 @@ void *aaruf_open(const char *filepath) // NOLINT(readability-function-size)
|
||||
|
||||
ctx->imageInfo.CreationTime = ctx->header.creationTime;
|
||||
ctx->imageInfo.LastModificationTime = ctx->header.lastWrittenTime;
|
||||
ctx->imageInfo.XmlMediaType = aaruf_get_xml_mediatype(ctx->header.mediaType);
|
||||
ctx->imageInfo.MetadataMediaType = aaruf_get_xml_mediatype(ctx->header.mediaType);
|
||||
|
||||
if(ctx->geometryBlock.identifier != GeometryBlock && ctx->imageInfo.XmlMediaType == BlockMedia)
|
||||
if(ctx->geometryBlock.identifier != GeometryBlock && ctx->imageInfo.MetadataMediaType == BlockMedia)
|
||||
{
|
||||
ctx->Cylinders = (uint32_t)(ctx->imageInfo.Sectors / 16 / 63);
|
||||
ctx->Heads = 16;
|
||||
|
||||
28
src/read.c
28
src/read.c
@@ -695,7 +695,7 @@ int32_t aaruf_read_track_sector(void *context, uint8_t *data, const uint64_t sec
|
||||
return AARUF_ERROR_NOT_AARUFORMAT;
|
||||
}
|
||||
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Incorrect media type %d, expected OpticalDisc", ctx->imageInfo.XmlMediaType);
|
||||
|
||||
@@ -881,7 +881,7 @@ int32_t aaruf_read_sector_long(void *context, const uint64_t sector_address, boo
|
||||
else
|
||||
corrected_sector_address += ctx->userDataDdtHeader.negative;
|
||||
|
||||
switch(ctx->imageInfo.XmlMediaType)
|
||||
switch(ctx->imageInfo.MetadataMediaType)
|
||||
{
|
||||
case OpticalDisc:
|
||||
if(ctx->imageInfo.MediaType == DVDROM || ctx->imageInfo.MediaType == PS2DVD ||
|
||||
@@ -1450,7 +1450,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
switch(tag)
|
||||
{
|
||||
case CdTrackFlags:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1476,7 +1476,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
FATAL("Track not found");
|
||||
return AARUF_ERROR_TRACK_NOT_FOUND;
|
||||
case CdTrackIsrc:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1502,7 +1502,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
FATAL("Track not found");
|
||||
return AARUF_ERROR_TRACK_NOT_FOUND;
|
||||
case CdSectorSubchannel:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1528,7 +1528,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdCmi:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1554,7 +1554,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorInformation:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1580,7 +1580,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorNumber:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1606,7 +1606,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorIed:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1632,7 +1632,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorEdc:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1658,7 +1658,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdTitleKeyDecrypted:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1684,7 +1684,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case AppleSonyTag:
|
||||
if(ctx->imageInfo.XmlMediaType != BlockMedia)
|
||||
if(ctx->imageInfo.MetadataMediaType != BlockMedia)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1710,7 +1710,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case AppleProfileTag:
|
||||
if(ctx->imageInfo.XmlMediaType != BlockMedia)
|
||||
if(ctx->imageInfo.MetadataMediaType != BlockMedia)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -1736,7 +1736,7 @@ int32_t aaruf_read_sector_tag(const void *context, const uint64_t sector_address
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case PriamDataTowerTag:
|
||||
if(ctx->imageInfo.XmlMediaType != BlockMedia)
|
||||
if(ctx->imageInfo.MetadataMediaType != BlockMedia)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_read_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
|
||||
28
src/write.c
28
src/write.c
@@ -252,7 +252,7 @@ int32_t aaruf_write_sector(void *context, uint64_t sector_address, bool negative
|
||||
ctx->currentBlockHeader.sectorSize = length;
|
||||
|
||||
// We need to save the track type for later compression
|
||||
if(ctx->imageInfo.XmlMediaType == OpticalDisc && ctx->trackEntries != NULL)
|
||||
if(ctx->imageInfo.MetadataMediaType == OpticalDisc && ctx->trackEntries != NULL)
|
||||
{
|
||||
const TrackEntry *track = NULL;
|
||||
for(int i = 0; i < ctx->tracksHeader.entries; i++)
|
||||
@@ -580,7 +580,7 @@ int32_t aaruf_write_sector_long(void *context, uint64_t sector_address, bool neg
|
||||
return AARUF_ERROR_SECTOR_OUT_OF_BOUNDS;
|
||||
}
|
||||
|
||||
switch(ctx->imageInfo.XmlMediaType)
|
||||
switch(ctx->imageInfo.MetadataMediaType)
|
||||
{
|
||||
case OpticalDisc:
|
||||
TrackEntry track = {0};
|
||||
@@ -2109,7 +2109,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
switch(tag)
|
||||
{
|
||||
case CdTrackFlags:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2134,7 +2134,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
FATAL("Track not found");
|
||||
return AARUF_ERROR_TRACK_NOT_FOUND;
|
||||
case CdTrackIsrc:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2159,7 +2159,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
FATAL("Track not found");
|
||||
return AARUF_ERROR_TRACK_NOT_FOUND;
|
||||
case CdSectorSubchannel:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2187,7 +2187,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdCmi:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2215,7 +2215,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorInformation:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2243,7 +2243,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorNumber:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2271,7 +2271,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorIed:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2299,7 +2299,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdSectorEdc:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2327,7 +2327,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case DvdTitleKeyDecrypted:
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2355,7 +2355,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case AppleSonyTag:
|
||||
if(ctx->imageInfo.XmlMediaType != BlockMedia)
|
||||
if(ctx->imageInfo.MetadataMediaType != BlockMedia)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2383,7 +2383,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case AppleProfileTag:
|
||||
if(ctx->imageInfo.XmlMediaType != BlockMedia)
|
||||
if(ctx->imageInfo.MetadataMediaType != BlockMedia)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
@@ -2411,7 +2411,7 @@ int32_t aaruf_write_sector_tag(void *context, const uint64_t sector_address, con
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_STATUS_OK");
|
||||
return AARUF_STATUS_OK;
|
||||
case PriamDataTowerTag:
|
||||
if(ctx->imageInfo.XmlMediaType != BlockMedia)
|
||||
if(ctx->imageInfo.MetadataMediaType != BlockMedia)
|
||||
{
|
||||
FATAL("Invalid media type for tag");
|
||||
TRACE("Exiting aaruf_write_sector_tag() = AARUF_ERROR_INCORRECT_MEDIA_TYPE");
|
||||
|
||||
@@ -396,11 +396,10 @@ int compare(const char *path1, const char *path2)
|
||||
tb_printf(mid_x + 2, rr, TB_WHITE | TB_BOLD, TB_BLUE, "Media type: ");
|
||||
tb_printf(mid_x + 14, rr++, TB_WHITE, TB_BLUE, "%u", ctx2->imageInfo.MediaType);
|
||||
|
||||
if(ctx1->MediaSequence > 0 || ctx1->LastMediaSequence > 0 ||
|
||||
ctx2->MediaSequence > 0 || ctx2->LastMediaSequence > 0)
|
||||
if(ctx1->MediaSequence > 0 || ctx1->LastMediaSequence > 0 || ctx2->MediaSequence > 0 || ctx2->LastMediaSequence > 0)
|
||||
{
|
||||
tb_printf(2, lr++, TB_WHITE | TB_BOLD, TB_BLUE, "Media is number %d in a set of %d media",
|
||||
ctx1->MediaSequence, ctx1->LastMediaSequence);
|
||||
tb_printf(2, lr++, TB_WHITE | TB_BOLD, TB_BLUE, "Media is number %d in a set of %d media", ctx1->MediaSequence,
|
||||
ctx1->LastMediaSequence);
|
||||
|
||||
tb_printf(mid_x + 2, rr++, TB_WHITE | TB_BOLD, TB_BLUE, "Media is number %d in a set of %d media",
|
||||
ctx2->MediaSequence, ctx2->LastMediaSequence);
|
||||
@@ -439,20 +438,20 @@ int compare(const char *path1, const char *path2)
|
||||
tb_printf(mid_x + 27, rr++, TB_WHITE, TB_BLUE, "%s", ctx2->DriveFirmwareRevision);
|
||||
}
|
||||
tb_printf(2, lr, TB_WHITE | TB_BOLD, TB_BLUE, "XML media type: ");
|
||||
tb_printf(18, lr++, TB_WHITE, TB_BLUE, "%d", ctx1->imageInfo.XmlMediaType);
|
||||
tb_printf(18, lr++, TB_WHITE, TB_BLUE, "%d", ctx1->imageInfo.MetadataMediaType);
|
||||
|
||||
tb_printf(mid_x + 2, rr, TB_WHITE | TB_BOLD, TB_BLUE, "XML media type: ");
|
||||
tb_printf(mid_x + 18, rr++, TB_WHITE, TB_BLUE, "%d", ctx2->imageInfo.XmlMediaType);
|
||||
tb_printf(mid_x + 18, rr++, TB_WHITE, TB_BLUE, "%d", ctx2->imageInfo.MetadataMediaType);
|
||||
|
||||
if(ctx1->Cylinders > 0 || ctx1->Heads > 0 || ctx1->SectorsPerTrack > 0 ||
|
||||
ctx2->Cylinders > 0 || ctx2->Heads > 0 || ctx2->SectorsPerTrack > 0)
|
||||
if(ctx1->Cylinders > 0 || ctx1->Heads > 0 || ctx1->SectorsPerTrack > 0 || ctx2->Cylinders > 0 || ctx2->Heads > 0 ||
|
||||
ctx2->SectorsPerTrack > 0)
|
||||
{
|
||||
tb_printf(2, lr++, TB_WHITE | TB_BOLD, TB_BLUE, "Media has %d cylinders, %d heads and %d sectors per track",
|
||||
ctx1->Cylinders, ctx1->Heads, ctx1->SectorsPerTrack);
|
||||
|
||||
tb_printf(mid_x + 2, rr++, TB_WHITE | TB_BOLD, TB_BLUE,
|
||||
"Media has %d cylinders, %d heads and %d sectors per track", ctx2->Cylinders,
|
||||
ctx2->Heads, ctx2->SectorsPerTrack);
|
||||
"Media has %d cylinders, %d heads and %d sectors per track", ctx2->Cylinders, ctx2->Heads,
|
||||
ctx2->SectorsPerTrack);
|
||||
}
|
||||
|
||||
tb_present();
|
||||
|
||||
@@ -595,7 +595,7 @@ int info(const char *path)
|
||||
printf("\tCreation time: %s\n", format_filetime(ctx->imageInfo.CreationTime));
|
||||
printf("\tLast written time: %s\n", format_filetime(ctx->imageInfo.LastModificationTime));
|
||||
printf("\tMedia type: %u (%s)\n", ctx->imageInfo.MediaType, media_type_to_string(ctx->imageInfo.MediaType));
|
||||
printf("\tXML media type: %d\n", ctx->imageInfo.XmlMediaType);
|
||||
printf("\tXML media type: %d\n", ctx->imageInfo.MetadataMediaType);
|
||||
|
||||
if(ctx->checksums.hasMd5)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ int verify_sectors(const char *path)
|
||||
return errno;
|
||||
}
|
||||
|
||||
if(ctx->imageInfo.XmlMediaType != OpticalDisc)
|
||||
if(ctx->imageInfo.MetadataMediaType != OpticalDisc)
|
||||
{
|
||||
printf("Image sectors do not contain checksums, cannot verify.\n");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user