Ignore:
Timestamp:
Feb 15, 2007, 12:27:39 AM (13 years ago)
Author:
Bruno Cornec
Message:

strip_spaces => mr_strip_spaces in mr_str.c and corrected at the same time :-)

File:
1 edited

Legend:

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

    r1166 r1168  
    1919#include "mr_mem.h"
    2020#include "mr_msg.h"
     21#include "mr_str.h"
    2122
    2223#include <sys/ioctl.h>
     
    11081109
    11091110    FILE *pin = NULL;
    1110     bool retval;
     1111    bool retval = FALSE;
    11111112    size_t n = 0;
    11121113    assert_string_is_neither_NULL_nor_zerolength(format);
     
    11271128    if (!pin) {
    11281129        log_OS_error("Unable to read good formats");
    1129         retval = FALSE;
    11301130    } else {
    11311131        mr_getline(&good_formats, &n , pin);
     
    11331133            log_OS_error("Cannot pclose good formats");
    11341134        }
    1135         strip_spaces(good_formats);
     1135        mr_strip_spaces(good_formats);
    11361136        // " ntfs 7 " -- um, cheating much? :)
    11371137        mr_asprintf(&tmp, " %s swap lvm raid ntfs 7 ",good_formats);
     
    11411141        if (strstr(good_formats, format_sz)) {
    11421142            retval = TRUE;
    1143         } else {
    1144             retval = FALSE;
    11451143        }
    11461144        mr_free(good_formats);
     
    17041702            // check whether already mounted - we better remove
    17051703            // surrounding spaces and trailing '/' for this
    1706             /* BERLIOS: Useless
    1707             strip_spaces(bkpinfo->nfs_mount);
    1708             */
     1704            mr_strip_spaces(bkpinfo->nfs_mount);
    17091705            if (bkpinfo->nfs_mount[strlen(bkpinfo->nfs_mount) - 1] == '/')
    17101706                bkpinfo->nfs_mount[strlen(bkpinfo->nfs_mount) - 1] = '\0';
     
    17681764        mr_free(tmp);
    17691765        // check whether writable - we better remove surrounding spaces for this
    1770         strip_spaces(bkpinfo->nfs_remote_dir);
     1766        mr_strip_spaces(bkpinfo->nfs_remote_dir);
    17711767        mr_asprintf(&command, "echo hi > '%s/%s/.dummy.txt'", bkpinfo->isodir,
    17721768                bkpinfo->nfs_remote_dir);
     
    17861782            mr_free(tmp);
    17871783            // check whether writable - we better remove surrounding space s for this
    1788             strip_spaces(bkpinfo->nfs_remote_dir);
     1784            mr_strip_spaces(bkpinfo->nfs_remote_dir);
    17891785
    17901786            mr_free(command);
     
    22932289    for (mr_getline(&current_drive, &n, pdrives); !feof(pdrives);
    22942290         mr_getline(&current_drive, &n, pdrives)) {
    2295         strip_spaces(current_drive);
     2291        mr_strip_spaces(current_drive);
    22962292        log_it("looking at drive %s's MBR", current_drive);
    22972293        if (does_string_exist_in_boot_block(current_drive, "GRUB")) {
Note: See TracChangeset for help on using the changeset viewer.