Changeset 1638 in MondoRescue for branches/stable/mondo/src/mondorestore/mondorestore.c
- Timestamp:
- Sep 19, 2007, 9:32:00 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.