diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-15 14:04:57 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-15 14:04:57 +0000 |
commit | 7ca61b6f3379bf66b446617b8834d92c13b366dd (patch) | |
tree | c0aaacfeb97a9bc74e73f8ff36ecbf1fd173808b /libbb/find_mount_point.c | |
parent | 8c9daa12dcb4c1aa8f0f475896c9cfbcfb38370d (diff) | |
download | busybox-w32-7ca61b6f3379bf66b446617b8834d92c13b366dd.tar.gz busybox-w32-7ca61b6f3379bf66b446617b8834d92c13b366dd.tar.bz2 busybox-w32-7ca61b6f3379bf66b446617b8834d92c13b366dd.zip |
- shared libbusybox.
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
Diffstat (limited to 'libbb/find_mount_point.c')
-rw-r--r-- | libbb/find_mount_point.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/find_mount_point.c b/libbb/find_mount_point.c index eec738aea..4d27b4809 100644 --- a/libbb/find_mount_point.c +++ b/libbb/find_mount_point.c | |||
@@ -48,11 +48,12 @@ extern struct mntent *find_mount_point(const char *name, const char *table) | |||
48 | mountDevice = s.st_dev; | 48 | mountDevice = s.st_dev; |
49 | 49 | ||
50 | 50 | ||
51 | if ((mountTable = setmntent(table ? : bb_path_mtab_file, "r")) == 0) | 51 | if ((mountTable = setmntent(table ? table : bb_path_mtab_file, "r")) == 0) |
52 | return 0; | 52 | return 0; |
53 | 53 | ||
54 | while ((mountEntry = getmntent(mountTable)) != 0) { | 54 | while ((mountEntry = getmntent(mountTable)) != 0) { |
55 | if (strcmp(name, mountEntry->mnt_dir) == 0 | 55 | |
56 | if(strcmp(name, mountEntry->mnt_dir) == 0 | ||
56 | || strcmp(name, mountEntry->mnt_fsname) == 0) /* String match. */ | 57 | || strcmp(name, mountEntry->mnt_fsname) == 0) /* String match. */ |
57 | break; | 58 | break; |
58 | if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice) /* Match the device. */ | 59 | if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice) /* Match the device. */ |