Changeset 1741 in MondoRescue for branches/2.2.5/mondo
- Timestamp:
- Oct 30, 2007, 11:44:02 AM (17 years ago)
- Location:
- branches/2.2.5/mondo/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/common/libmondo-devices.c
r1739 r1741 1619 1619 * @return 0 for success, nonzero for failure. 1620 1620 */ 1621 int mount_USB_here(char *device, char *mountpoint) 1622 { 1623 /*@ buffer ****************************************************** */ 1624 char *command; 1625 char *dev; 1626 int retval; 1627 1628 malloc_string(command); 1629 malloc_string(dev); 1630 malloc_string(options); 1631 assert_string_is_neither_NULL_nor_zerolength(device); 1632 assert_string_is_neither_NULL_nor_zerolength(mountpoint); 1633 1634 make_hole_for_dir(mountpoint); 1635 if (isdigit(device[0])) { 1636 return(1); 1637 } else { 1638 strcpy(dev, device); 1639 } 1640 log_msg(4, "(mount_USB_here --- device=%s, mountpoint=%s", device, 1641 mountpoint); 1642 1643 #ifdef __FreeBSD__ 1644 sprintf(command, "mount_vfat %s %s 2>> %s", 1645 device, mountpoint, MONDO_LOGFILE); 1646 1647 #else 1648 sprintf(command, "mount %s -t vfat %s 2>> %s", 1649 device, options, mountpoint, MONDO_LOGFILE); 1650 #endif 1651 1652 log_msg(4, command); 1653 retval = system(command); 1654 log_msg(1, "system(%s) returned %d", command, retval); 1655 1656 paranoid_free(command); 1657 paranoid_free(dev); 1658 paranoid_free(options); 1659 return (retval); 1660 } 1661 1662 /** 1663 * Mount the CD-ROM at @p mountpoint. 1664 * @param device The device (or file if g_ISO_restore_mode) to mount. 1665 * @param mountpoint The place to mount it. 1666 * @return 0 for success, nonzero for failure. 1667 */ 1621 1668 int mount_CDROM_here(char *device, char *mountpoint) 1622 1669 { … … 2647 2694 } 2648 2695 if (!is_this_device_mounted(MNT_CDROM)) { 2649 mount_CDROM_here(mountdev, MNT_CDROM); 2696 if (bkpinfo->backup_media_type == usb) { 2697 mount_USB_here(mountdev, MNT_CDROM); 2698 } else { 2699 mount_CDROM_here(mountdev, MNT_CDROM); 2700 } 2650 2701 } 2651 2702 cd_number = -
branches/2.2.5/mondo/src/mondorestore/mondo-prep.c
r1645 r1741 2530 2530 strcpy(program, "mkfs.jfs"); 2531 2531 } else if (strcmp(format, "ext3") == 0) { 2532 strcpy(program, "mkfs -t ext 2 -F -j-q");2532 strcpy(program, "mkfs -t ext3 -F -q"); 2533 2533 } else if (strcmp(format, "minix") == 0) { 2534 2534 strcpy(program, "mkfs.minix"); -
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-newt.c
r1645 r1741 253 253 strcpy(format_str, "ufs"); 254 254 #else 255 strcpy(format_str, "ext 2");255 strcpy(format_str, "ext3"); 256 256 #endif 257 257 size_str[0] = '\0'; -
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-tools.c
r1740 r1741 574 574 update_progress_form(tmp); 575 575 strcpy(format, mountlist->el[lino].format); 576 /* BERLIOS: removed as it doen't make sens to not mount ext3 partitions as ext3 576 577 if (!strcmp(format, "ext3")) { 577 578 strcpy(format, "ext2"); 578 579 } 580 */ 579 581 res = mount_device(mountlist->el[lino].device, 580 582 mountlist->el[lino].mountpoint, … … 692 694 #endif 693 695 } else if (bkpinfo->backup_media_type == usb) { 694 sprintf(mount_cmd, "mount - r%s %s", bkpinfo->media_device, MNT_CDROM);696 sprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM); 695 697 } else if (strstr(bkpinfo->media_device, "/dev/")) { 696 698 #ifdef __FreeBSD__ … … 1011 1013 fatal_error("Cannot get USB device name from cfg file"); 1012 1014 } 1013 s trcpy(bkpinfo->media_device, value);1015 sprintf(bkpinfo->media_device, "%s1", value); 1014 1016 sprintf(tmp, "Backup medium is USB --- dev=%s", bkpinfo->media_device); 1015 1017 log_msg(2, tmp);
Note:
See TracChangeset
for help on using the changeset viewer.