From e4019b251c6b51e9ab330c7b30518a6b1723716f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 30 Nov 2010 11:20:59 +0000 Subject: [PATCH] Processing output of -as mkisofs by -pkt_output if enabled --- libisoburn/trunk/xorriso/opts_p_z.c | 23 +++++++++++++------- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/libisoburn/trunk/xorriso/opts_p_z.c b/libisoburn/trunk/xorriso/opts_p_z.c index 59fd3ad7..9ba7d73b 100644 --- a/libisoburn/trunk/xorriso/opts_p_z.c +++ b/libisoburn/trunk/xorriso/opts_p_z.c @@ -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); diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index fb54255a..0efefdd1 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.11.30.104719" +#define Xorriso_timestamP "2010.11.30.112050"