Ignore:
Timestamp:
Oct 21, 2007, 2:27:53 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • Fix PB macro vs tools/*2build issue
  • make_usb_fs change of interface (doesn't need a parameter)
  • Fix USB support in mondo to avoid multiple copies of files
  • Use first partiion in mondo for USB device
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/common/libmondo-archive.c

    r1689 r1691  
    18571857 * @return The number of errors encountered (0 for success)
    18581858 */
    1859 int make_usb_fs(char *destfile)
     1859int make_usb_fs()
    18601860{
    18611861    /*@ int ********************************************** */
     
    18721872    malloc_string(old_pwd);
    18731873    assert(bkpinfo != NULL);
    1874     assert_string_is_neither_NULL_nor_zerolength(destfile);
    1875 
    1876     log_msg(2, "make_usb_fs --- scratchdir=%s --- destfile=%s",
    1877             bkpinfo->scratchdir, destfile);
     1874
     1875    log_msg(2, "make_usb_fs --- scratchdir=%s", bkpinfo->scratchdir);
    18781876    (void) getcwd(old_pwd, MAX_STR_LEN - 1);
    18791877    asprintf(&tmp, "chmod 755 %s", bkpinfo->scratchdir);
     
    18981896    run_program_and_log_output(tmp, FALSE);
    18991897    paranoid_free(tmp);
    1900     asprintf(&tmp, "mount %s %s", bkpinfo->media_device, tmp1);
     1898    /* Mindi always create one single parition on the USB dev */
     1899    asprintf(&tmp, "mount %s1 %s", bkpinfo->media_device, tmp1);
    19011900    run_program_and_log_output(tmp, FALSE);
    19021901    paranoid_free(tmp);
     
    19071906        log_msg(1, "Making bootable backup");
    19081907
    1909         asprintf(&tmp,"cp -rp %s/* %s", bkpinfo->scratchdir, tmp1); /* Command to execute */
     1908        /* Command to execute */
     1909        asprintf(&tmp,"mv %s/.??* %s/* %s", bkpinfo->scratchdir, bkpinfo->scratchdir, tmp1);
    19101910        res = eval_call_to_make_USB(tmp, message_to_screen);
    19111911        if (res) {
     
    19231923
    19241924    if (is_this_device_mounted(bkpinfo->media_device)) {
    1925         asprintf(&tmp, "umount %s", bkpinfo->media_device);
     1925        asprintf(&tmp, "umount %s1", bkpinfo->media_device);
    19261926        run_program_and_log_output(tmp, FALSE);
    19271927        paranoid_free(tmp);
     
    19351935    return (retval);
    19361936}
    1937 
    19381937
    19391938
     
    39373936            res = make_iso_fs(isofile);
    39383937        } else {
    3939             res = make_usb_fs(isofile);
     3938            res = make_usb_fs();
    39403939        }
    39413940        if (g_current_media_number == 1 && !res
Note: See TracChangeset for help on using the changeset viewer.