Made Xorriso_tell_media_space() ready for long block adresses

This commit is contained in:
Thomas Schmitt 2024-03-19 21:54:14 +01:00
parent 662b305d12
commit c64e48d588
4 changed files with 8 additions and 7 deletions

View File

@ -1663,9 +1663,9 @@ ex:;
int Xorriso_tell_media_space(struct XorrisO *xorriso,
int *media_space, int *free_space, int flag)
off_t *media_space, off_t *free_space, int flag)
{
int ret;
off_t ret;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
struct burn_write_opts *burn_options;

View File

@ -1623,7 +1623,8 @@ int Xorriso_option_system_id(struct XorrisO *xorriso, char *name, int flag)
/* Option -tell_media_space */
int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag)
{
int ret, free_space= 0, media_space= 0;
int ret;
off_t free_space= 0, media_space= 0;
ret= Xorriso_tell_media_space(xorriso, &media_space, &free_space, 0);
if(ret<=0) {
@ -1636,9 +1637,9 @@ int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag)
"Pending image size larger than free space on medium");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
}
sprintf(xorriso->result_line, "Media space : %ds\n", media_space);
sprintf(xorriso->result_line, "Media space : %.fs\n", (double) media_space);
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "After commit : %ds\n", free_space);
sprintf(xorriso->result_line, "After commit : %.fs\n", (double) free_space);
Xorriso_result(xorriso, 0);
return(1);
}

View File

@ -1 +1 @@
#define Xorriso_timestamP "2024.03.19.185848"
#define Xorriso_timestamP "2024.03.19.205356"

View File

@ -76,7 +76,7 @@ int Xorriso_show_boot_info(struct XorrisO *xorriso, int flag);
int Xorriso_show_devices(struct XorrisO *xorriso, int flag);
int Xorriso_tell_media_space(struct XorrisO *xorriso,
int *media_space, int *free_space, int flag);
off_t *media_space, off_t *free_space, int flag);
/* @param flag bit0=fast , bit1=deformat
@return 0=failure, did not touch medium , -1=failure, altered medium