diff --git a/xorriso/write_run.c b/xorriso/write_run.c index 0bcc3b0f..71df27bf 100644 --- a/xorriso/write_run.c +++ b/xorriso/write_run.c @@ -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 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; - struct burn_progress progress; + struct burn_progress_v2 progress; + off_t last_sector; char *status_text, date_text[80], *speed_unit, mem_text[8]; enum burn_drive_status drive_status; 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) { last_time= current_time; 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) { /* 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; if(emul==2) { if(progress.sector<=progress.sectors) - sprintf(xorriso->info_text, "%4d of %4d MB written", - progress.sector / 512, progress.sectors / 512); + sprintf(xorriso->info_text, "%4.f of %4.f MB written", + (double) (progress.sector / 512), + (double) ( progress.sectors / 512)); else - sprintf(xorriso->info_text, "%4d MB written", - progress.sector / 512); + sprintf(xorriso->info_text, "%4.f MB written", + (double) (progress.sector / 512)); if(xorriso->pacifier_fifo!=NULL) 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", 100.0 * ((double) progress.sector) / ((double) progress.sectors)); mem_text[5]= 0; - sprintf(xorriso->info_text, "Writing: %10ds %s%% ", - progress.sector, mem_text); + sprintf(xorriso->info_text, "Writing: %10.fs %s%% ", + (double) progress.sector, mem_text); } else { Sfile_scale(2048.0 * (double) progress.sector, mem_text, 5, 1e4, 1); - sprintf(xorriso->info_text, "Writing: %10ds %s ", - progress.sector, mem_text); + sprintf(xorriso->info_text, "Writing: %10.fs %s ", + (double) progress.sector, mem_text); } ret= isoburn_get_fifo_status(drive, &size, &free_bytes, &status_text); if(ret>0 ) diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index ece8e1d8..2516eaa9 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2024.03.21.212514" +#define Xorriso_timestamP "2024.03.22.133412"