Changeset 3610 in MondoRescue for branches/3.2/mondo/src/common/libmondo-stream.c
- Timestamp:
- Nov 5, 2016, 6:12:23 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-stream.c
r3527 r3610 256 256 int find_tape_device_and_size(char *dev, char *siz) 257 257 { 258 char tmp[MAX_STR_LEN];258 char *tmp = NULL; 259 259 char *command = NULL; 260 260 char *cdr_exe = NULL; … … 269 269 } 270 270 mr_asprintf(command, "%s -scanbus 2> /dev/null | grep -i tape | wc -l", cdr_exe); 271 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));271 tmp = call_program_and_get_last_line_of_output(command); 272 272 mr_free(command); 273 273 … … 282 282 283 283 mr_asprintf(command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f2 | head -n1", cdr_exe); 284 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));284 tmp = call_program_and_get_last_line_of_output(command); 285 285 mr_free(command); 286 286 … … 294 294 mr_free(cdr_exe); 295 295 296 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));296 tmp = call_program_and_get_last_line_of_output(command); 297 297 mr_free(command); 298 298 … … 326 326 } 327 327 328 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | awk '{for(i=1; i<NF; i++) { if (index($i, \"GB\")>0) { print $i;};};};'"));328 tmp = call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | awk '{for(i=1; i<NF; i++) { if (index($i, \"GB\")>0) { print $i;};};};'"); 329 329 330 330 if (mt_says_tape_exists(dev)) {
Note:
See TracChangeset
for help on using the changeset viewer.