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-compare.c

    r2324 r2325  
    360360  /**  needs malloc **********/
    361361
    362     char *tarball_fname = NULL;
    363     char *progress_str = NULL;
    364     char *tmp = NULL;
     362    char *tarball_fname, *progress_str;
     363    char *tmp = NULL;
    365364    char *mds = NULL;
    366365    long max_val;
    367366
     367    malloc_string(tarball_fname);
     368    malloc_string(progress_str);
    368369
    369370    assert(bkpinfo != NULL);
    370371    mvaddstr_and_log_it(g_currentY, 0, "Comparing archives");
    371 
    372     malloc_string(tmp);
    373     read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp);
     372    tmp = read_cfg_var(g_mondo_cfg_file, "last-filelist-number");
    374373    max_val = atol(tmp);
     374    mr_free(tmp);
     375
    375376    paranoid_free(tmp);
    376377
     
    442443        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    443444    }
     445    paranoid_free(tarball_fname);
     446    paranoid_free(progress_str);
    444447    return (retval);
    445448}
     
    671674                        0, "Verifying archives against filesystem");
    672675
     676    mr_free(bkpinfo->media_device);
    673677    if (bkpinfo->disaster_recovery && does_file_exist("/tmp/CDROM-LIVES-HERE")) {
    674         strcpy(bkpinfo->media_device,
    675                last_line_of_file("/tmp/CDROM-LIVES-HERE"));
    676     } else {
    677         find_cdrom_device(bkpinfo->media_device, FALSE);
     678        mr_asprintf(bkpinfo->media_device, "%s", last_line_of_file("/tmp/CDROM-LIVES-HERE"));
     679    } else {
     680        bkpinfo->media_device = find_cdrom_device(FALSE);
    678681    }
    679682    res = verify_tape_backups();
Note: See TracChangeset for help on using the changeset viewer.