Treat discs with empty first 64k as blank, and as full otherwise.
This commit is contained in:
parent
c15f26645f
commit
6d7d67baaa
@ -240,8 +240,19 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|||||||
isoburn_set_start_byte(o, (off_t) 0, 0);
|
isoburn_set_start_byte(o, (off_t) 0, 0);
|
||||||
o->fabricated_disc_status= BURN_DISC_BLANK;
|
o->fabricated_disc_status= BURN_DISC_BLANK;
|
||||||
} else {
|
} else {
|
||||||
// TODO for now I treat this as a full disc
|
int i;
|
||||||
|
|
||||||
|
/* check first 64K. If 0's, the disc is treated as a blank disc, and thus
|
||||||
|
overwritten without extra check. If not, the disc is treated as full,
|
||||||
|
and user needs to isoburn_disc_erase() it before burn it again */
|
||||||
|
i = sizeof(o->target_iso_head);
|
||||||
|
while (i && !o->target_iso_head[i-1])
|
||||||
|
--i;
|
||||||
|
|
||||||
|
if (i)
|
||||||
o->fabricated_disc_status= BURN_DISC_FULL;
|
o->fabricated_disc_status= BURN_DISC_FULL;
|
||||||
|
else
|
||||||
|
o->fabricated_disc_status= BURN_DISC_BLANK;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user