Ignore:
Timestamp:
Nov 4, 2007, 3:16:40 AM (17 years ago)
Author:
Bruno Cornec
Message:

Update to busybox 1.7.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi-busybox/libbb/find_mount_point.c

    r821 r1765  
    88 */
    99
    10 #include <stdio.h>
    11 #include <string.h>
    1210#include "libbb.h"
     11#include <mntent.h>
    1312
    14 
    15 #include <mntent.h>
    1613/*
    1714 * Given a block device, find the mount table entry if that block device
     
    3734
    3835
    39     if ((mountTable = setmntent(table ? table : bb_path_mtab_file, "r")) == 0)
     36    mountTable = setmntent(table ? table : bb_path_mtab_file, "r");
     37    if (!mountTable)
    4038        return 0;
    4139
    4240    while ((mountEntry = getmntent(mountTable)) != 0) {
    43 
    44             if(strcmp(name, mountEntry->mnt_dir) == 0
    45             || strcmp(name, mountEntry->mnt_fsname) == 0)   /* String match. */
     41        if (strcmp(name, mountEntry->mnt_dir) == 0
     42         || strcmp(name, mountEntry->mnt_fsname) == 0
     43        ) { /* String match. */
    4644            break;
     45        }
    4746        if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice)  /* Match the device. */
    4847            break;
Note: See TracChangeset for help on using the changeset viewer.