Changeset 2296 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-stream.c
- Timestamp:
- Jul 23, 2009, 2:53:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-stream.c
r2266 r2296 273 273 strcpy(cdr_exe, "dvdrecord"); 274 274 } 275 mr_asprintf(&command, "%s -scanbus 2> /dev/null | grep -i tape | wc -l", 276 cdr_exe); 275 mr_asprintf(&command, "%s -scanbus 2> /dev/null | grep -i tape | wc -l", cdr_exe); 277 276 strcpy(tmp, call_program_and_get_last_line_of_output(command)); 278 277 mr_free(command); … … 284 283 return 1; 285 284 } 286 mr_asprintf(&command, 287 "%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", 288 cdr_exe); 285 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); 289 286 strcpy(tmp, call_program_and_get_last_line_of_output(command)); 290 287 mr_free(command); … … 294 291 return 1; 295 292 } 296 mr_asprintf(&command, 297 "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f3 | cut -d')' -f1 | head -n1", 298 cdr_exe); 293 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' ' -f3 | cut -d')' -f1 | head -n1", cdr_exe); 299 294 strcpy(tmp, call_program_and_get_last_line_of_output(command)); 300 295 mr_free(command); … … 475 470 log_it("Insisting on tape #%d", tapeno); 476 471 if (g_current_media_number != tapeno) { 477 mr_asprintf(&tmp, 478 "When the tape drive goes quiet, please insert volume %d in this series.", 479 tapeno); 472 mr_asprintf(&tmp, "When the tape drive goes quiet, please insert volume %d in this series.", tapeno); 480 473 popup_and_OK(tmp); 481 474 mr_free(tmp); … … 869 862 (void) getcwd(old_cwd, MAX_STR_LEN); 870 863 chdir(bkpinfo->tmpdir); 871 mr_asprintf(&tmp, "tar -zxf %s ./tmp/mondo-restore.cfg 2> /dev/null", 872 outfname); 864 mr_asprintf(&tmp, "tar -zxf %s ./tmp/mondo-restore.cfg 2> /dev/null", outfname); 873 865 paranoid_system(tmp); 874 866 mr_free(tmp); … … 1143 1135 } 1144 1136 if (strcmp(temp_cksum, actual_cksum)) { 1145 mr_asprintf(&tmp, "actual cksum=%s; recorded cksum=%s", actual_cksum, 1146 temp_cksum); 1137 mr_asprintf(&tmp, "actual cksum=%s; recorded cksum=%s", actual_cksum, temp_cksum); 1147 1138 log_to_screen(tmp); 1148 1139 mr_free(tmp); 1149 1140 1150 mr_asprintf(&tmp, "%s (%ld K) is corrupt on tape", temp_fname, 1151 (long) orig_size >> 10); 1141 mr_asprintf(&tmp, "%s (%ld K) is corrupt on tape", temp_fname, (long) orig_size >> 10); 1152 1142 log_to_screen(tmp); 1153 1143 mr_free(tmp); … … 1500 1490 } 1501 1491 if (bkpinfo->backup_media_type == cdstream) { 1502 mr_asprintf(&command, 1503 "cdrecord -eject dev=%s speed=%d fs=24m -waiti - >> %s 2>> %s", 1504 bkpinfo->media_device, bkpinfo->cdrw_speed, MONDO_LOGFILE, 1505 MONDO_LOGFILE); 1492 mr_asprintf(&command, "cdrecord -eject dev=%s speed=%d fs=24m -waiti - >> %s 2>> %s", bkpinfo->media_device, bkpinfo->cdrw_speed, MONDO_LOGFILE, MONDO_LOGFILE); 1506 1493 log_it("Opening OUT to next CD with the command"); 1507 1494 log_it(command); … … 1706 1693 p++; 1707 1694 } 1708 mr_asprintf(&tmp, "Writing file '%s' to tape (%ld KB)", p, 1709 (long) filesize >> 10); 1695 mr_asprintf(&tmp, "Writing file '%s' to tape (%ld KB)", p, (long) filesize >> 10); 1710 1696 log_it(tmp); 1711 1697 mr_free(tmp); … … 1812 1798 fwrite(tempblock, 1, (size_t) TAPE_BLOCK_SIZE, 1813 1799 g_tape_stream) / 1024; 1814 mr_asprintf(&tmp, "%s (fname=%s, size=%ld K)", 1815 marker_to_string(control_char), p, 1816 (long) length_of_incoming_file >> 10); 1800 mr_asprintf(&tmp, "%s (fname=%s, size=%ld K)", marker_to_string(control_char), p, (long) length_of_incoming_file >> 10); 1817 1801 log_msg(6, tmp); 1818 1802 mr_free(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.