Changeset 1638 in MondoRescue for branches/stable/mondo/src/mondorestore
- Timestamp:
- Sep 19, 2007, 9:32:00 AM (18 years ago)
- Location:
- branches/stable/mondo/src/mondorestore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/mondorestore/mondo-rstr-compare.c
r1633 r1638 230 230 char *archiver_exe = NULL; 231 231 char *compressor_exe = NULL; 232 #ifdef __FreeBSD__ 233 long BUFSIZE=512L; 234 #else 235 long BUFSIZE=(1024L*1024L)/mr_conf->external_tape_blexternal_tape_blocksize; 236 #endif 237 232 238 233 239 use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE; … … 271 277 } 272 278 273 #ifdef __FreeBSD__274 #define BUFSIZE 512L275 #else276 #define BUFSIZE (1024L*1024L)/TAPE_BLOCK_SIZE277 #endif278 279 279 mr_asprintf(&logfile, "/tmp/afio.log.%d", current_tarball_number); 280 280 if (use_star) // doesn't use compressor_exe … … 287 287 "%s -r -b %ld -M 16m -c %ld %s %s >> %s 2>> %s", 288 288 archiver_exe, 289 TAPE_BLOCK_SIZE,289 mr_conf->external_tape_blocksize, 290 290 BUFSIZE, compressor_exe, tarball_fname, logfile, logfile); 291 291 } 292 #undef BUFSIZE293 292 mr_free(archiver_exe); 294 293 mr_free(compressor_exe); -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1629 r1638 886 886 bkpinfo->internal_tape_block_size); 887 887 } else { 888 bkpinfo->internal_tape_block_size = 889 DEFAULT_INTERNAL_TAPE_BLOCK_SIZE; 890 mr_msg(1, "Internal tape block size = default (%ld)", 891 DEFAULT_INTERNAL_TAPE_BLOCK_SIZE); 888 bkpinfo->internal_tape_block_size = mr_conf->internal_tape_blocksize; 889 mr_msg(1, "Internal tape block size = default (%ld)", mr_conf->internal_tape_blocksize); 892 890 } 893 891 -
branches/stable/mondo/src/mondorestore/mondorestore.c
r1628 r1638 438 438 read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo); 439 439 iamhere("Done loading config file; resizing ML"); 440 mr_asprintf(&tmp,bkpinfo->prefix); 440 441 if (popup_and_get_string 441 ("Prefix", "Prefix of your ISO images ?", bkpinfo->prefix, MAX_STR_LEN / 4)) { 442 ("Prefix", "Prefix of your ISO images ?", tmp, MAX_STR_LEN / 4)) { 443 mr_free(bkpinfo->prefix); 444 bkpinfo->prefix = tmp; 442 445 mr_msg(1, "Prefix set to %s",bkpinfo->prefix); 443 446 } … … 1038 1041 1039 1042 pathname_of_last_file_restored[0] = '\0'; 1040 bigblk = mr_malloc( TAPE_BLOCK_SIZE);1043 bigblk = mr_malloc(mr_conf->external_tape_blocksize); 1041 1044 1042 1045 if (!(fin = fopen(slice_fname(bigfileno, 0, ARCHIVES_PATH, ""), "r"))) { … … 1249 1252 1250 1253 while (!feof(fbzip2)) { 1251 siz = fread(bigblk, 1, TAPE_BLOCK_SIZE, fbzip2);1254 siz = fread(bigblk, 1, mr_conf->external_tape_blocksize, fbzip2); 1252 1255 if (siz > 0) { 1253 1256 siz = fwrite(bigblk, 1, siz, fout); … … 1567 1570 char *xattr_fname = NULL; 1568 1571 char *acl_fname = NULL; 1572 #ifdef __FreeBSD__ 1573 long BUFSIZE=512L; 1574 #else 1575 long BUFSIZE=(1024L*1024L)/mr_conf->external_tape_blocksize; 1576 #endif 1577 1569 1578 1570 1579 assert_string_is_neither_NULL_nor_zerolength(tarball_fname); … … 1651 1660 mr_free(tmp); 1652 1661 } 1653 #ifdef __FreeBSD__1654 #define BUFSIZE 5121655 #else1656 #define BUFSIZE (1024L*1024L)/TAPE_BLOCK_SIZE1657 #endif1658 1659 1662 if (use_star) { 1660 1663 mr_asprintf(&command, … … 1668 1671 mr_asprintf(&command, 1669 1672 "afio -i -M 8m -b %ld -c %ld %s -w '%s' %s", 1670 TAPE_BLOCK_SIZE,1673 mr_conf->external_tape_blocksize, 1671 1674 BUFSIZE, executable, filelist_subset_fname, 1672 1675 tarball_fname); … … 1674 1677 mr_asprintf(&command, 1675 1678 "afio -i -b %ld -c %ld -M 8m %s %s", 1676 TAPE_BLOCK_SIZE,1679 mr_conf->external_tape_blocksize, 1677 1680 BUFSIZE, executable, tarball_fname); 1678 1681 } … … 1680 1683 mr_free(executable); 1681 1684 1682 #undef BUFSIZE1683 1685 mr_asprintf(&temp_log, "/tmp/%d.%d", (int) (random() % 32768), 1684 1686 (int) (random() % 32768)); … … 1841 1843 } else { 1842 1844 use_star = FALSE; 1843 mr_asprintf(&command, "afio -t -M 8m -b %ld %s %s", TAPE_BLOCK_SIZE,1845 mr_asprintf(&command, "afio -t -M 8m -b %ld %s %s", mr_conf->external_tape_blocksize, 1844 1846 executable, afio_fname); 1845 1847 } … … 1883 1885 // afio 1884 1886 if (filelist) { 1885 mr_asprintf(&command, "afio -i -M 8m -b %ld %s -w %s %s 2>> %s", TAPE_BLOCK_SIZE, executable, filelist_subset_fname, afio_fname, MONDO_LOGFILE);1887 mr_asprintf(&command, "afio -i -M 8m -b %ld %s -w %s %s 2>> %s", mr_conf->external_tape_blocksize, executable, filelist_subset_fname, afio_fname, MONDO_LOGFILE); 1886 1888 } else { 1887 mr_asprintf(&command, "afio -i -M 8m -b %ld %s %s 2>> %s", TAPE_BLOCK_SIZE, executable, afio_fname, MONDO_LOGFILE);1889 mr_asprintf(&command, "afio -i -M 8m -b %ld %s %s 2>> %s", mr_conf->external_tape_blocksize, executable, afio_fname, MONDO_LOGFILE); 1888 1890 } 1889 1891 }
Note:
See TracChangeset
for help on using the changeset viewer.