Directed -as mkisofs -print-size to real stdout

This commit is contained in:
Thomas Schmitt 2008-02-23 11:40:42 +00:00
parent 6a1d8b1b5b
commit 415aeb858f
3 changed files with 19 additions and 7 deletions

View File

@ -6788,7 +6788,7 @@ not_enough_args:;
}
}
if(do_print_size) {
ret= Xorriso_option_print_size(xorriso, 0);
ret= Xorriso_option_print_size(xorriso, 1);
if(ret<=0)
goto ex;
}
@ -9072,10 +9072,12 @@ int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag)
}
/* Option -print-size */
/* Option -print-size
@param flag bit0= report in mkisofs compatible form on real stdout
*/
int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
{
int ret;
int ret, fd;
if(!xorriso->volset_change_pending) {
sprintf(xorriso->info_text,"-print-size: No image modifications pending");
@ -9090,8 +9092,16 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
}
if(flag&1) {
sprintf(xorriso->result_line,"%d\n", ret);
fd= xorriso->dev_fd_1;
if(fd<0)
fd= 1;
write(fd, xorriso->result_line, strlen(xorriso->result_line));
} else {
sprintf(xorriso->result_line,"Image size : %ds\n", ret);
Xorriso_result(xorriso,0);
}
return(1);
}

View File

@ -353,7 +353,9 @@ int Xorriso_option_pkt_output(struct XorrisO *xorriso, char *mode, int flag);
/* Option -print */
int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag);
/* Option -print-size */
/* Option -print-size
@param flag bit0= report in mkisofs compatible form on real stdout
*/
int Xorriso_option_print_size(struct XorrisO *xorriso, int flag);
/* Option -prog */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.02.23.102903"
#define Xorriso_timestamP "2008.02.23.113902"