Ignore:
Timestamp:
Aug 18, 2009, 3:19:15 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3336@localhost: bruno | 2009-08-11 16:32:36 +0200

  • bkpinfo->media_device, bkpinfo->nfs_remote_dir, and bkpinfo->nfs_mount are now dynamically allocated
  • new interfaces for find_cdrom_device(), find_tape_device_and_size(), find_dvd_device(), find_cdrw_device(), set_dev_to_this_if_rx_OK() and read_cfg_var() which allocate the string now returned
  • Better differentiation between ISO and NFS iso file names construction
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-newt.c

    r2323 r2325  
    22612261/**
    22622262 * Get information about the location of ISO images from the user.
    2263  * @param isodir_device Where to put the device (e.g. /dev/hda4) the user enters.
     2263 * @param isodir_device Where to put the device (e.g. /dev/hda4) the user enters. Allocted by the function
    22642264 * @param isodir_format Where to put the format (e.g. ext2) the user enters.
    22652265 * @param isodir_path Where to put the path (e.g. /var/cache/mondo) the user enters.
     
    22672267 * @return TRUE if OK was pressed, FALSE otherwise.
    22682268 */
    2269 bool get_isodir_info(char *isodir_device, char *isodir_format, char *isodir_path, bool nuke_me_please)
    2270 {
     2269bool get_isodir_info(char *isodir_device, char *isodir_format, char *isodir_path, bool nuke_me_please) {
    22712270
    22722271    char *p = NULL;
     
    22782277    /** initialize ********************************************************/
    22792278
    2280     assert(isodir_device != NULL);
    22812279    assert(isodir_path != NULL);
    22822280
    22832281    log_it("isodir_path = %s", isodir_path);
    2284     if (isodir_device[0] == '\0') {
     2282    if (isodir_device == NULL) {
    22852283        mr_asprintf(idev, "/dev/");
    22862284    } else {
     
    22972295
    22982296    /* modify for the caller */
    2299     strcpy(isodir_device, idev);
     2297    mr_free(isodir_device);
     2298    isodir_device = idev;
    23002299    if (nuke_me_please) {
    23012300        ret = TRUE;
     
    23162315   
    23172316                    /* modify for the caller */
    2318                     strcpy(isodir_device, p);
     2317                    mr_free(isodir_device);
     2318                    isodir_device = p;
    23192319                    mr_free(isodir_path);
    23202320                    isodir_path = r;
     
    23272327        mr_free(p);
    23282328    }
    2329     mr_free(idev);
    23302329    mr_free(isodir_format);
    23312330    return(ret);
Note: See TracChangeset for help on using the changeset viewer.