Changeset 1767 in MondoRescue for branches/2.2.5/mondo


Ignore:
Timestamp:
Nov 5, 2007, 5:42:27 PM (16 years ago)
Author:
Bruno Cornec
Message:

Remove dummy file created on NFS - report from Arnaud Tiger <arnaud.tiger_at_hp.com>

Location:
branches/2.2.5/mondo/src
Files:
2 edited

Legend:

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

    r1746 r1767  
    18631863{
    18641864    char *tmp;
     1865    char *tmp1 = NULL;
    18651866    char *sz_size;
    18661867    char *command;
     
    22122213        // check whether writable - we better remove surrounding spaces for this
    22132214        strip_spaces(bkpinfo->nfs_remote_dir);
    2214         sprintf(command, "echo hi > %s/%s/.dummy.txt", bkpinfo->isodir,
    2215                 bkpinfo->nfs_remote_dir);
     2215        asprintf(&tmp1,"%s/%s/.dummy.txt", bkpinfo->isodir,bkpinfo->nfs_remote_dir);
     2216        sprintf(command, "echo hi > %s", tmp1);
    22162217        while (run_program_and_log_output(command, FALSE)) {
    22172218            strcpy(tmp, bkpinfo->nfs_remote_dir);
     
    22272228            // check whether writable - we better remove surrounding space s for this
    22282229            strip_spaces(bkpinfo->nfs_remote_dir);
    2229             sprintf(command, "echo hi > %s/%s/.dummy.txt", bkpinfo->isodir,
    2230                     bkpinfo->nfs_remote_dir);
    2231         }
     2230            paranoid_free(tmp1);
     2231            asprintf(&tmp1,"%s/%s/.dummy.txt", bkpinfo->isodir,bkpinfo->nfs_remote_dir);
     2232            sprintf(command, "echo hi > %s", tmp1);
     2233        }
     2234        unlink(tmp1);
     2235        paranoid_free(tmp1);
     2236
    22322237        if (!popup_and_get_string
    22332238            ("Prefix.",
  • branches/2.2.5/mondo/src/mondoarchive/mondo-cli.c

    r1746 r1767  
    820820
    821821    if (flag_set['n']) {
    822         sprintf(tmp, "echo hi > %s/%s/.dummy.txt", bkpinfo->isodir,
    823                 bkpinfo->nfs_remote_dir);
     822        asprintf(&tmp1,"%s/%s/.dummy.txt", bkpinfo->isodir,bkpinfo->nfs_remote_dir);
     823        sprintf(tmp, "echo hi > %s", tmp1);
    824824        if (run_program_and_log_output(tmp, 2)) {
    825825            retval++;
     
    829829            log_to_screen(tmp);
    830830        }
     831        unlink(tmp1);
     832        paranoid_free(tmp1);
    831833    }
    832834
Note: See TracChangeset for help on using the changeset viewer.