Made sure that -pvd_info reports the actual PVD address

This commit is contained in:
Thomas Schmitt 2009-10-06 07:15:58 +00:00
parent 45b95cc158
commit 7fa0284f73
2 changed files with 18 additions and 5 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.10.05.190215"
#define Xorriso_timestamP "2009.10.06.071704"

View File

@ -12880,11 +12880,12 @@ ex:;
int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
{
int ret, msc1= -1, msc2;
int ret, msc1= -1, msc2, i;
IsoImage *image;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
char *msg;
char *msg, block_head[8];
off_t head_count;
msg= xorriso->result_line;
ret= Xorriso_get_volume(xorriso, &image, 0);
@ -12897,10 +12898,22 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
return(ret);
Xorriso_toc(xorriso, 128);
if(msc1 >= 0) {
sprintf(msg, "PVD address : %ds\n", msc1 + 16);
for(i = msc1 + 16; i < msc1 + 32; i++) {
ret= burn_read_data(drive, (off_t) i * (off_t) 2048, block_head,
(off_t) sizeof(block_head), &head_count, 2);
if(ret <= 0) {
i= msc1 + 32;
break;
}
if(block_head[0] == 1 && strncmp(block_head + 1, "CD001", 5) == 0)
break;
}
if(i < msc1 + 32) {
sprintf(msg, "PVD address : %ds\n", i);
Xorriso_result(xorriso,0);
}
}
}
sprintf(msg, "System Id : %s\n", un0(iso_image_get_system_id(image)));
Xorriso_result(xorriso,0);
sprintf(msg, "Volume Id : %s\n", un0(iso_image_get_volume_id(image)));