New API function isoburn_disc_available_space() fixes bug with DVD+RW capacity
This commit is contained in:
@ -6711,6 +6711,7 @@ int Xorriso_option_end(struct XorrisO *xorriso, int flag)
|
||||
xorriso->volset_change_pending= 0;
|
||||
} else {
|
||||
ret= Xorriso_option_commit(xorriso, 1);
|
||||
xorriso->volset_change_pending= 0; /* no further tries to commit */
|
||||
if(ret<=0)
|
||||
return(ret);
|
||||
}
|
||||
@ -7871,7 +7872,7 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
|
||||
if(!xorriso->volset_change_pending) {
|
||||
sprintf(xorriso->info_text,"-print-size: No image modifications pending");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
|
||||
sprintf(xorriso->result_line,"Image size : 0\n");
|
||||
sprintf(xorriso->result_line,"Image size : 0s\n");
|
||||
Xorriso_result(xorriso,0);
|
||||
return(2);
|
||||
}
|
||||
@ -7881,7 +7882,7 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||
return(0);
|
||||
}
|
||||
sprintf(xorriso->result_line,"Image size : %d\n", ret);
|
||||
sprintf(xorriso->result_line,"Image size : %ds\n", ret);
|
||||
Xorriso_result(xorriso,0);
|
||||
return(1);
|
||||
}
|
||||
@ -8175,9 +8176,9 @@ int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag)
|
||||
"Pending image size larger than free space on media");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
|
||||
}
|
||||
sprintf(xorriso->result_line, "Media space : %d\n", media_space);
|
||||
sprintf(xorriso->result_line, "Media space : %ds\n", media_space);
|
||||
Xorriso_result(xorriso, 0);
|
||||
sprintf(xorriso->result_line, "Free space : %d\n", free_space);
|
||||
sprintf(xorriso->result_line, "After commit : %ds\n", free_space);
|
||||
Xorriso_result(xorriso, 0);
|
||||
return(1);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.02.09.092805"
|
||||
#define Xorriso_timestamP "2008.02.09.100750"
|
||||
|
@ -813,7 +813,7 @@ no_track:;
|
||||
burn_track_define_data(tracks[0], 0, padding * 2048, 0, BURN_MODE1);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
|
||||
media_space= burn_disc_available_space(drive, burn_options) / (off_t) 2048;
|
||||
media_space= isoburn_disc_available_space(drive, burn_options) / (off_t) 2048;
|
||||
if(media_space < img_sectors + padding) {
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
sprintf(xorriso->info_text,"Image size %ds exceeds free space on media %ds",
|
||||
@ -1900,7 +1900,7 @@ int Xorriso_tell_media_space(struct XorrisO *xorriso,
|
||||
if(ret<=0)
|
||||
return(-1);
|
||||
(*free_space)= (*media_space)=
|
||||
burn_disc_available_space(drive, burn_options) / (off_t) 2048;
|
||||
isoburn_disc_available_space(drive, burn_options) / (off_t) 2048;
|
||||
burn_write_opts_free(burn_options);
|
||||
|
||||
if(xorriso->volset_change_pending) {
|
||||
|
Reference in New Issue
Block a user