Ignore:
Timestamp:
Aug 18, 2009, 3:19:15 PM (16 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/common/libmondo-verify.c

    r2324 r2325  
    924924    assert(bkpinfo != NULL);
    925925
     926    if (bkpinfo->media_device == NULL) {
     927        return(1);
     928    }
     929
    926930    mr_asprintf(fname, "%s1", bkpinfo->media_device);
    927931    if (is_this_device_mounted(fname)) {
     
    10221026    assert(bkpinfo != NULL);
    10231027
     1028    if (bkpinfo->media_device == NULL) {
     1029        return(1);
     1030    }
     1031
    10241032    mr_asprintf(mountpoint, "%s/cdrom", bkpinfo->tmpdir);
    1025     mr_asprintf(fname, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, g_current_media_number);
     1033    if (((bkpinfo->isodir == NULL) && (bkpinfo->nfs_remote_dir == NULL)) || (bkpinfo->prefix == NULL)) {
     1034        fatal_error("No iso filename preparation possible");
     1035    }
     1036    if (bkpinfo->nfs_remote_dir) {
     1037        // NFS
     1038        mr_asprintf(fname, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, g_current_media_number);
     1039    } else {
     1040        // ISO
     1041        mr_asprintf(fname, "%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number);
     1042    }
    10261043
    10271044    mkdir(mountpoint, 1777);
     
    11061123        mr_free(command);
    11071124
    1108         if (!bkpinfo->please_dont_eject
    1109             && eject_device(bkpinfo->media_device)) {
     1125        if (!bkpinfo->please_dont_eject && eject_device(bkpinfo->media_device)) {
    11101126            log_msg(2, "Failed to eject CD-ROM drive");
    11111127        }
Note: See TracChangeset for help on using the changeset viewer.