Better handling of pseudo-drive without read-permission
This commit is contained in:
parent
878931f788
commit
472d7610ad
@ -1305,6 +1305,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||||||
else
|
else
|
||||||
readable_blocks= -1;
|
readable_blocks= -1;
|
||||||
}
|
}
|
||||||
|
if(o->fabricated_disc_status == BURN_DISC_BLANK)
|
||||||
|
{ret= 0; goto failure;}
|
||||||
|
|
||||||
start_time= last_pacifier= time(NULL);
|
start_time= last_pacifier= time(NULL);
|
||||||
lba= 0;
|
lba= 0;
|
||||||
|
@ -449,6 +449,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|||||||
struct burn_drive *drive;
|
struct burn_drive *drive;
|
||||||
struct ecma119_pri_vol_desc *pvm;
|
struct ecma119_pri_vol_desc *pvm;
|
||||||
enum burn_disc_status s;
|
enum burn_disc_status s;
|
||||||
|
char path[BURN_DRIVE_ADR_LEN], msg[2 * BURN_DRIVE_ADR_LEN];
|
||||||
|
|
||||||
if(o==NULL) {
|
if(o==NULL) {
|
||||||
isoburn_msgs_submit(NULL, 0x00060000,
|
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)
|
if(capacity > 0 && (off_t) capacity * (off_t) 2048 < to_read)
|
||||||
to_read = (off_t) capacity * (off_t) 2048;
|
to_read = (off_t) capacity * (off_t) 2048;
|
||||||
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
|
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) {
|
if (ret <= 0) {
|
||||||
/* an error means a disc with no ISO image */
|
/* 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;
|
o->fabricated_disc_status= BURN_DISC_FULL;
|
||||||
else if(!(flag & 1))
|
else if(!(flag & 1))
|
||||||
o->fabricated_disc_status= BURN_DISC_BLANK;
|
o->fabricated_disc_status= BURN_DISC_BLANK;
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2011.03.22.081408"
|
#define Xorriso_timestamP "2011.03.24.182518"
|
||||||
|
Loading…
Reference in New Issue
Block a user