Changeset 2704 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-fork.c
- Timestamp:
- Jan 27, 2011, 7:31:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-fork.c
r2696 r2704 35 35 * @note The returned value points to an allocated string that the caller needs to free 36 36 */ 37 char *call_program_and_get_last_line_of_output(char *call )37 char *call_program_and_get_last_line_of_output(char *call, bool logit) 38 38 { 39 39 /*@ buffers ***************************************************** */ … … 52 52 mr_asprintf(tmpf, "%s/cpgll.out", bkpinfo->tmpdir); 53 53 mr_asprintf(newcall, "%s > %s", call, tmpf); 54 log_msg(4, "Calling command: %s", newcall); 54 if (logit) { 55 log_msg(4, "Calling command: %s", newcall); 56 } 55 57 /* By default return an empty string in any case */ 56 58 mr_asprintf(result, ""); … … 73 75 mr_free(tmp); 74 76 } 75 log_msg(9, "Pre-Result: %s", result); 77 if (logit) { 78 log_msg(9, "Pre-Result: %s", result); 79 } 76 80 mr_strip_spaces(result); 77 81 paranoid_pclose(fin); … … 80 84 } 81 85 mr_free(tmpf); 82 log_msg(4, "Result: %s", result); 86 if (logit) { 87 log_msg(4, "Result: %s", result); 88 } 83 89 return(result); 84 90 }
Note:
See TracChangeset
for help on using the changeset viewer.