Changeset 3190 in MondoRescue for branches/3.1/mondo/src/common/libmondo-stream.c
- Timestamp:
- Sep 25, 2013, 8:55:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mondo/src/common/libmondo-stream.c
r3161 r3190 193 193 } 194 194 if (should_we_write_to_next_tape 195 (bkpinfo->media_size [g_current_media_number], (off_t)256 * 1024)) {195 (bkpinfo->media_size, (off_t)256 * 1024)) { 196 196 start_to_write_to_next_tape(); 197 197 } … … 206 206 { 207 207 fwrite (blk, 1, 256*1024, g_tape_stream); 208 if (should_we_write_to_next_tape (bkpinfo->media_size [g_current_media_number], 256*1024))208 if (should_we_write_to_next_tape (bkpinfo->media_size, 256*1024)) 209 209 { 210 210 start_to_write_to_next_tape (); … … 278 278 mr_asprintf(dev, "%s", VANILLA_SCSI_TAPE); 279 279 mr_free(tmp); 280 mr_free(cdr_exe); 280 281 return(dev); 281 282 } … … 288 289 if (strlen(tmp) < 2) { 289 290 log_it("Could not find tape device"); 291 mr_free(cdr_exe); 290 292 mr_free(tmp); 291 293 return(NULL); … … 295 297 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); 296 298 mr_free(cdr_exe); 299 297 300 tmp = call_program_and_get_last_line_of_output(command,TRUE); 298 301 mr_free(command); … … 812 815 log_to_screen("Reading stream"); 813 816 log_it("stream device = '%s'", bkpinfo->media_device); 814 /* skip data disks */817 /* skip data disks */ 815 818 open_evalcall_form("Skipping data disks on stream"); 816 819 log_to_screen("Skipping data disks on stream"); … … 937 940 } 938 941 if (bkpinfo->media_device == NULL) { 939 log_it("Unable to openout NULL d vice");942 log_it("Unable to openout NULL device"); 940 943 return(1); 941 944 } … … 1305 1308 char *pA; 1306 1309 char *pB; 1310 int res; 1307 1311 int ctrl_chr; 1308 int res;1309 1312 char *temp_fname; 1310 1313 char *datablock; … … 1325 1328 while (ctrl_chr != BLK_START_AN_AFIO_OR_SLICE) { 1326 1329 res = read_header_block_from_stream(&temp_size, temp_fname, &ctrl_chr); 1330 if (res) { 1331 // FIXME 1332 } 1327 1333 if (ctrl_chr == BLK_START_AN_AFIO_OR_SLICE) { 1328 1334 break; … … 1472 1478 log_it("New tape requested."); 1473 1479 insist_on_this_tape_number(g_current_media_number + 1); // will increment g_current_media, too 1474 if (g_current_media_number > MAX_NOOF_MEDIA) {1475 res++;1476 log_to_screen("Too many tapes. Man, you need to use nfs!");1477 }1478 1480 if (bkpinfo->backup_media_type == cdstream) { 1479 1481 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); … … 1663 1665 filesize = length_of_file(infile); 1664 1666 if (should_we_write_to_next_tape 1665 (bkpinfo->media_size [g_current_media_number], filesize)) {1667 (bkpinfo->media_size, filesize)) { 1666 1668 start_to_write_to_next_tape(); 1667 1669 write_backcatalog_to_tape();
Note:
See TracChangeset
for help on using the changeset viewer.