Changeset 1969


Ignore:
Timestamp:
May 29, 2008, 7:36:58 PM (11 years ago)
Author:
bruno
Message:
  • Change order of test do that when restoring, cdrecord is really not called ;-)
  • mondoarchive already configures correctly the device name to non-rew so avoid doing it again at restore time
  • Fix automatic mode handling which was exiting in fact.
Location:
branches/2.2.6/mondo/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.6/mondo/src/common/libmondo-cli.c

    r1967 r1969  
    534534    }
    535535
    536     if (flag_set['t'] && !flag_set['d']) {
     536    if ((flag_set['t'] && !flag_set['d']) && (! bkpinfo->restore_data)) {
    537537        log_it("Hmm! No tape drive specified. Let's see what we can do.");
    538538        if (find_tape_device_and_size(flag_val['d'], tmp)) {
  • branches/2.2.6/mondo/src/common/libmondo-devices.c

    r1968 r1969  
    18341834    case tape:
    18351835
    1836         if ((find_tape_device_and_size(bkpinfo->media_device, sz_size)) && (!bkpinfo->restore_mode)) {
     1836        if ((!bkpinfo->restore_mode) && (find_tape_device_and_size(bkpinfo->media_device, sz_size))) {
    18371837            log_msg(3, "Ok, using vanilla scsi tape.");
    18381838            strcpy(bkpinfo->media_device, VANILLA_SCSI_TAPE);
  • branches/2.2.6/mondo/src/common/libmondo-stream.c

    r1968 r1969  
    748748    char fname[MAX_STR_LEN];
    749749    char *datablock;
    750     char *ntapedev = NULL;
    751750    char tmp[MAX_STR_LEN];
    752751    char old_cwd[MAX_STR_LEN];
     
    779778        return (0);
    780779    }
    781     ntapedev = get_non_rewind_dev(bkpinfo->media_device);
    782     if ((bkpinfo->use_obdr) && (ntapedev != NULL)) {
    783         strncpy(bkpinfo->media_device,ntapedev,(size_t)(MAX_STR_LEN / 4));
     780
     781    // mondoarchive should have configured everything to give the right non-rew device
     782    if ((bkpinfo->use_obdr) && (bkpinfo->media_device != NULL)) {
    784783        res = skip_obdr();
    785784        if (res != 0) {
     
    787786        }
    788787    } else {
    789         if (ntapedev == NULL) {
     788        if (bkpinfo->media_device == NULL) {
    790789            log_it("Not able to skip OBDR - Restore will have to be done manually");
    791790        }
    792791        set_tape_block_size_with_mt(bkpinfo->internal_tape_block_size);
    793792    }
    794     paranoid_free(ntapedev);
    795793
    796794    insist_on_this_tape_number(1);
  • branches/2.2.6/mondo/src/mondorestore/mondorestore.c

    r1968 r1969  
    270270    if (c == 'I' || c == 'C') {
    271271        interactively_obtain_media_parameters_from_user(FALSE);
     272    } else if (c == 'N') {
     273        // Auto mode nothing special to do
    272274    } else {
    273275        popup_and_OK("No restoring or comparing will take place today.");
Note: See TracChangeset for help on using the changeset viewer.