Commit 4897fc74 authored by Thomas Schmitt's avatar Thomas Schmitt

Processing output of -as mkisofs by -pkt_output if enabled

parent 07c2bb84
......@@ -245,6 +245,7 @@ int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag)
/* Option -print_size
@param flag bit0= report in mkisofs compatible form on real stdout
(resp. on result channel if xorriso->packet_output)
*/
int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
{
......@@ -253,8 +254,10 @@ 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 : 0s\n");
Xorriso_result(xorriso,0);
if(!(flag & 1)) {
sprintf(xorriso->result_line,"Image size : 0s\n");
Xorriso_result(xorriso,0);
}
return(2);
}
ret= Xorriso_write_session(xorriso, 1);
......@@ -265,12 +268,16 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
}
if(flag&1) {
sprintf(xorriso->result_line,"%d\n", ret);
fd= xorriso->dev_fd_1;
if(fd<0)
fd= 1;
ret= write(fd, xorriso->result_line, strlen(xorriso->result_line));
/* (result of write intentionally ignored) */
fsync(fd);
if(xorriso->packet_output) {
Xorriso_result(xorriso,0);
} else {
fd= xorriso->dev_fd_1;
if(fd<0)
fd= 1;
ret= write(fd, xorriso->result_line, strlen(xorriso->result_line));
/* (result of write intentionally ignored) */
fsync(fd);
}
} else {
sprintf(xorriso->result_line,"Image size : %ds\n", ret);
Xorriso_result(xorriso,0);
......
#define Xorriso_timestamP "2010.11.30.104719"
#define Xorriso_timestamP "2010.11.30.112050"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment