Changeset 2443 in MondoRescue


Ignore:
Timestamp:
Sep 29, 2009, 8:43:38 PM (15 years ago)
Author:
Bruno Cornec
Message:
  • priority given to env var for tmpdir
  • fuse FS excluded from tmpdir computation
Location:
branches/2.2.9/mondo/src/common
Files:
2 edited

Legend:

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

    r2436 r2443  
    27562756    mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("LANGUAGE=C df -m -P -t nonfs,msdosfs,ntfs,ntfs-3g,smbfs,smb,cifs,afs,gfs,ocfs,ocfs2,mvfs,nsspool,nssvol | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
    27572757#else
    2758     mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("LANGUAGE=C df -m -P -x nfs -x nfs4 -x fuse.sshfs -x vfat -x ntfs -x ntfs-3g -x smbfs -x smb -x cifs -x afs -x gfs -x ocfs -x ocfs2 -x mvfs -x nsspool -x nssvol -x iso9660 | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
     2758    mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("LANGUAGE=C df -m -P -x nfs -x nfs4 -x fuse.sshfs -x fuse -x vfat -x ntfs -x ntfs-3g -x smbfs -x smb -x cifs -x afs -x gfs -x ocfs -x ocfs2 -x mvfs -x nsspool -x nssvol -x iso9660 | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
    27592759#endif
    27602760
  • branches/2.2.9/mondo/src/common/libmondo-tools.c

    r2424 r2443  
    776776    }
    777777
    778     if (path != NULL) {
    779         mr_asprintf(&tmp, "%s/mondo.tmp.XXXXXX", path);
    780     } else if (getenv("TMPDIR")) {
     778    /* Always take in account env first */
     779    if (getenv("TMPDIR")) {
    781780        mr_asprintf(&tmp, "%s/mondo.tmp.XXXXXX", getenv("TMPDIR"));
    782781    } else if (getenv("TMP")) {
    783782        mr_asprintf(&tmp, "%s/mondo.tmp.XXXXXX", getenv("TMP"));
     783    } else if (path != NULL) {
     784        mr_asprintf(&tmp, "%s/mondo.tmp.XXXXXX", path);
    784785    } else {
    785786        mr_asprintf(&tmp, "/tmp/mondo.tmp.XXXXXX");
Note: See TracChangeset for help on using the changeset viewer.