Made Xorriso_pacifier_loop() ready for long block adresses
This commit is contained in:
parent
c8788712fc
commit
ce3f23b75d
@ -1652,9 +1652,10 @@ int Xorriso_check_burn_abort(struct XorrisO *xorriso, int flag)
|
|||||||
int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||||
int flag)
|
int flag)
|
||||||
{
|
{
|
||||||
int ret, size, free_bytes, i, aborting= 0, emul, buffer_fill= 50, last_sector;
|
int ret, size, free_bytes, i, aborting= 0, emul, buffer_fill= 50;
|
||||||
int iso_wait_counter= 0, iso_cancel_limit= 5;
|
int iso_wait_counter= 0, iso_cancel_limit= 5;
|
||||||
struct burn_progress progress;
|
struct burn_progress_v2 progress;
|
||||||
|
off_t last_sector;
|
||||||
char *status_text, date_text[80], *speed_unit, mem_text[8];
|
char *status_text, date_text[80], *speed_unit, mem_text[8];
|
||||||
enum burn_drive_status drive_status;
|
enum burn_drive_status drive_status;
|
||||||
double start_time, current_time, last_time, base_time= 0.0, base_count= 0.0;
|
double start_time, current_time, last_time, base_time= 0.0, base_count= 0.0;
|
||||||
@ -1690,7 +1691,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|||||||
while(1) {
|
while(1) {
|
||||||
last_time= current_time;
|
last_time= current_time;
|
||||||
last_sector= progress.sector;
|
last_sector= progress.sector;
|
||||||
drive_status= burn_drive_get_status(drive, &progress);
|
drive_status= burn_drive_get_status_v2(drive, &progress);
|
||||||
|
|
||||||
if(drive_status == BURN_DRIVE_IDLE) {
|
if(drive_status == BURN_DRIVE_IDLE) {
|
||||||
/* To avoid a race condition between burn_source and libisofs
|
/* To avoid a race condition between burn_source and libisofs
|
||||||
@ -1720,11 +1721,12 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|||||||
/ (double) progress.buffer_capacity;
|
/ (double) progress.buffer_capacity;
|
||||||
if(emul==2) {
|
if(emul==2) {
|
||||||
if(progress.sector<=progress.sectors)
|
if(progress.sector<=progress.sectors)
|
||||||
sprintf(xorriso->info_text, "%4d of %4d MB written",
|
sprintf(xorriso->info_text, "%4.f of %4.f MB written",
|
||||||
progress.sector / 512, progress.sectors / 512);
|
(double) (progress.sector / 512),
|
||||||
|
(double) ( progress.sectors / 512));
|
||||||
else
|
else
|
||||||
sprintf(xorriso->info_text, "%4d MB written",
|
sprintf(xorriso->info_text, "%4.f MB written",
|
||||||
progress.sector / 512);
|
(double) (progress.sector / 512));
|
||||||
|
|
||||||
if(xorriso->pacifier_fifo!=NULL)
|
if(xorriso->pacifier_fifo!=NULL)
|
||||||
ret= burn_fifo_inquire_status(xorriso->pacifier_fifo,
|
ret= burn_fifo_inquire_status(xorriso->pacifier_fifo,
|
||||||
@ -1798,12 +1800,12 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|||||||
sprintf(mem_text, "%5.1f",
|
sprintf(mem_text, "%5.1f",
|
||||||
100.0 * ((double) progress.sector) / ((double) progress.sectors));
|
100.0 * ((double) progress.sector) / ((double) progress.sectors));
|
||||||
mem_text[5]= 0;
|
mem_text[5]= 0;
|
||||||
sprintf(xorriso->info_text, "Writing: %10ds %s%% ",
|
sprintf(xorriso->info_text, "Writing: %10.fs %s%% ",
|
||||||
progress.sector, mem_text);
|
(double) progress.sector, mem_text);
|
||||||
} else {
|
} else {
|
||||||
Sfile_scale(2048.0 * (double) progress.sector, mem_text, 5, 1e4, 1);
|
Sfile_scale(2048.0 * (double) progress.sector, mem_text, 5, 1e4, 1);
|
||||||
sprintf(xorriso->info_text, "Writing: %10ds %s ",
|
sprintf(xorriso->info_text, "Writing: %10.fs %s ",
|
||||||
progress.sector, mem_text);
|
(double) progress.sector, mem_text);
|
||||||
}
|
}
|
||||||
ret= isoburn_get_fifo_status(drive, &size, &free_bytes, &status_text);
|
ret= isoburn_get_fifo_status(drive, &size, &free_bytes, &status_text);
|
||||||
if(ret>0 )
|
if(ret>0 )
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2024.03.21.212514"
|
#define Xorriso_timestamP "2024.03.22.133412"
|
||||||
|
Loading…
Reference in New Issue
Block a user