Ignore:
Timestamp:
Jan 12, 2006, 5:37:42 PM (14 years ago)
Author:
bcornec
Message:

use df -P everywhere to avoid split lines on df output and some bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mondo/mondo/common/libmondo-tools.c

    r275 r305  
    10141014    assert_string_is_neither_NULL_nor_zerolength(partition);
    10151015
    1016     sprintf(command, "df -m %s &> /dev/null", partition);
     1016    sprintf(command, "df -m -P %s &> /dev/null", partition);
    10171017    if (system(command)) {
    10181018        return (-1);
    10191019    }                           // partition does not exist
    1020     sprintf(command, "df -m %s | tail -n1 | tr -s ' ' '\t' | cut -f4",
     1020    sprintf(command, "df -m -P %s | tail -n1 | tr -s ' ' '\t' | cut -f4",
    10211021            partition);
    10221022    strcpy(out_sz, call_program_and_get_last_line_of_output(command));
Note: See TracChangeset for help on using the changeset viewer.