Better handling of pseudo-drive without read-permission

This commit is contained in:
Thomas Schmitt 2011-03-24 18:25:00 +00:00
parent 878931f788
commit 472d7610ad
3 changed files with 12 additions and 3 deletions

View File

@ -1305,6 +1305,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
else
readable_blocks= -1;
}
if(o->fabricated_disc_status == BURN_DISC_BLANK)
{ret= 0; goto failure;}
start_time= last_pacifier= time(NULL);
lba= 0;

View File

@ -449,6 +449,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
struct burn_drive *drive;
struct ecma119_pri_vol_desc *pvm;
enum burn_disc_status s;
char path[BURN_DRIVE_ADR_LEN], msg[2 * BURN_DRIVE_ADR_LEN];
if(o==NULL) {
isoburn_msgs_submit(NULL, 0x00060000,
@ -482,10 +483,16 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
if(capacity > 0 && (off_t) capacity * (off_t) 2048 < to_read)
to_read = (off_t) capacity * (off_t) 2048;
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
to_read, &data_count, 2);
to_read, &data_count, 2 | 8);
if (ret <= 0) {
/* an error means a disc with no ISO image */
if (capacity > 0)
if (ret == -2) {
path[0]= 0;
burn_drive_d_get_adr(drive, path);
sprintf(msg, "Pseudo drive '%s' does not allow reading", path);
isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "NOTE", 0);
o->fabricated_disc_status= BURN_DISC_BLANK;
} else if (capacity > 0)
o->fabricated_disc_status= BURN_DISC_FULL;
else if(!(flag & 1))
o->fabricated_disc_status= BURN_DISC_BLANK;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.03.22.081408"
#define Xorriso_timestamP "2011.03.24.182518"