Made burn_disc_available_space() take into respect burn_write_opts_set_start_byte()
This commit is contained in:
parent
64ae333863
commit
0ddeb01502
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2007.02.22.094939"
|
||||
#define Cdrskin_timestamP "2007.02.22.113016"
|
||||
|
@ -1445,12 +1445,18 @@ off_t burn_disc_available_space(struct burn_drive *d,
|
||||
int lba, nwa;
|
||||
|
||||
if (burn_drive_is_released(d))
|
||||
return d->media_capacity_remaining;
|
||||
goto ex;
|
||||
if (d->busy != BURN_DRIVE_IDLE)
|
||||
return d->media_capacity_remaining;
|
||||
goto ex;
|
||||
if (o != NULL)
|
||||
d->send_write_parameters(d, o);
|
||||
d->get_nwa(d, -1, &lba, &nwa);
|
||||
ex:;
|
||||
if (o->start_byte > 0) {
|
||||
if (o->start_byte > d->media_capacity_remaining)
|
||||
return 0;
|
||||
return d->media_capacity_remaining - o->start_byte;
|
||||
}
|
||||
return d->media_capacity_remaining;
|
||||
}
|
||||
|
||||
|
@ -847,6 +847,9 @@ int burn_disc_get_msc1(struct burn_drive *d, int *start_lba);
|
||||
inquiring the space with such a set of options, the drive has to be
|
||||
grabbed and BURN_DRIVE_IDLE. If not, then one will only get a canned value
|
||||
from the most recent automatic inquiry (e.g. during last drive grabbing).
|
||||
An eventual start address from burn_write_opts_set_start_byte() will be
|
||||
subtracted from the obtained capacity estimation. Negative results get
|
||||
defaulted to 0.
|
||||
@param d The drive to query.
|
||||
@param o If not NULL: write parameters to be set on drive before query
|
||||
@return number of most probably available free bytes
|
||||
|
Loading…
Reference in New Issue
Block a user