Changeset 2769 in MondoRescue
- Timestamp:
- Apr 21, 2011, 1:48:52 PM (14 years ago)
- Location:
- branches/2.2.9/mondo/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-devices.c
r2745 r2769 1355 1355 { 1356 1356 char *mount_cmd; 1357 char *mountdir = NULL; 1357 1358 int i, res; 1358 1359 #ifdef __FreeBSD__ … … 1397 1398 1398 1399 } else if (bkpinfo->backup_media_type == iso) { 1400 if (bkpinfo->subdir) { 1401 mr_asprintf(&mountdir, "%s/%s", bkpinfo->isodir, bkpinfo->subdir); 1402 } else { 1403 mr_asprintf(&mountdir, "%s", bkpinfo->isodir); 1404 } 1399 1405 #ifdef __FreeBSD__ 1400 sprintf(mount_cmd, "%s/%s-%d.iso", bkpinfo->isodir,1406 sprintf(mount_cmd, "%s/%s-%d.iso", mountdir, 1401 1407 bkpinfo->prefix, g_current_media_number); 1402 1408 mddev = make_vn(mount_cmd); … … 1404 1410 #else 1405 1411 sprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", 1406 bkpinfo->isodir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);1412 mountdir, bkpinfo->prefix, g_current_media_number, MNT_CDROM); 1407 1413 #endif 1408 1414 } else if (bkpinfo->backup_media_type == usb) { -
branches/2.2.9/mondo/src/common/libmondo-tools.c
r2751 r2769 799 799 bkpinfo->netfs_remote_dir[0] = '\0'; 800 800 bkpinfo->exclude_paths = NULL; 801 bkpinfo->subdir = NULL; 801 802 bkpinfo->postnuke_tarball[0] = '\0'; 802 803 bkpinfo->wipe_media_first = FALSE; -
branches/2.2.9/mondo/src/common/mondostructures.h
r2697 r2769 581 581 */ 582 582 char *netfs_user; 583 584 /** 585 * The potential subdirectory under which are located ISO images on HDD (restore mode only) 586 */ 587 char *subdir; 583 588 584 589 /** -
branches/2.2.9/mondo/src/common/newt-specific.c
r2700 r2769 449 449 mr_free(bkpinfo->exclude_devs); 450 450 mr_free(bkpinfo->exclude_paths); 451 mr_free(bkpinfo->subdir); 451 452 452 453 /* Then free the structure */ -
branches/2.2.9/mondo/src/include/mr_conf.h
r2208 r2769 59 59 /* Default compression level */ 60 60 int compression_level; 61 /* Subdir for ISO images on HDD */ 62 char *subdir; 61 63 /* Paths to exclude from backup */ 62 64 char *exclude_paths; -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-newt.c
r2767 r2769 2281 2281 { 2282 2282 2283 bool HDD = FALSE; 2284 char *subdir_path; 2283 2285 /** initialize ********************************************************/ 2284 2286 … … 2311 2313 "What is the disk format of the device? (Hit ENTER if you don't know.)", 2312 2314 isodir_format, 16)) { 2315 if (popup_with_button("Are you restoring from an external hard drive ?", "Yes", "No")) { 2316 HDD = TRUE; 2317 } 2313 2318 if (popup_and_get_string 2314 2319 ("ISO Mode - path", 2315 "At what path on this device can the ISO files be found ? (Use /tmp/isodir if restoring from HDD)",2316 2320 "At what path on this device can the ISO files be found ?", 2321 isodir_path, MAX_STR_LEN / 4)) { 2317 2322 strip_spaces(isodir_device); 2318 2323 strip_spaces(isodir_format); 2319 2324 strip_spaces(isodir_path); 2320 2325 log_it("isodir_device = %s - isodir_format = %s - isodir_path = %s", isodir_device, isodir_format, isodir_path); 2326 if (HDD) { 2327 /* We need an additional param */ 2328 mr_asprintf(&subdir_path, "%s", isodir_path); 2329 bkpinfo->subdir = subdir_path; 2330 strcpy(isodir_path, "/tmp/isodir"); 2331 } 2321 2332 return (TRUE); 2322 2333 } -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-tools.c
r2758 r2769 900 900 if (strcmp(old_isodir, bkpinfo->isodir)) { 901 901 log_it 902 ("user nominated isodir differs from archive, keeping user's choice: %s %s\n",902 ("user nominated isodir %s differs from archive %s, keeping user's choice\n", 903 903 old_isodir, bkpinfo->isodir); 904 904 strcpy(bkpinfo->isodir, old_isodir);
Note:
See TracChangeset
for help on using the changeset viewer.