aboutsummaryrefslogtreecommitdiff
path: root/umount.c
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-03-22 07:12:05 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-03-22 07:12:05 +0000
commit15e97e9d2a52ed70a4b13c5acad29a55d73b2484 (patch)
tree3602e12b02fe289306dccfb27fba31fda53db690 /umount.c
parent2fb92e2d54e18b7d82608112988362bb031ddc9a (diff)
downloadbusybox-w32-15e97e9d2a52ed70a4b13c5acad29a55d73b2484.tar.gz
busybox-w32-15e97e9d2a52ed70a4b13c5acad29a55d73b2484.tar.bz2
busybox-w32-15e97e9d2a52ed70a4b13c5acad29a55d73b2484.zip
Use the nice new find_real_root_device function to find the
name of the root device, instead of having libc read whatever lies happen to be in /etc/mtab. -Erik git-svn-id: svn://busybox.net/trunk/busybox@418 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'umount.c')
-rw-r--r--umount.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/umount.c b/umount.c
index 6661db878..c34bf5fc3 100644
--- a/umount.c
+++ b/umount.c
@@ -26,7 +26,6 @@
26#include <stdio.h> 26#include <stdio.h>
27#include <sys/mount.h> 27#include <sys/mount.h>
28#include <mntent.h> 28#include <mntent.h>
29#include <fstab.h>
30#include <errno.h> 29#include <errno.h>
31 30
32 31
@@ -110,11 +109,10 @@ char *mtab_getinfo(const char *match, const char which)
110 } else { 109 } else {
111#if !defined BB_MTAB 110#if !defined BB_MTAB
112 if (strcmp(cur->device, "/dev/root") == 0) { 111 if (strcmp(cur->device, "/dev/root") == 0) {
113 struct fstab *fstabItem; 112 /* Adjusts device to be the real root device,
114 113 * or leaves device alone if it can't find it */
115 fstabItem = getfsfile("/"); 114 find_real_root_device_name( cur->device);
116 if (fstabItem != NULL) 115 return ( cur->device);
117 return fstabItem->fs_spec;
118 } 116 }
119#endif 117#endif
120 return cur->device; 118 return cur->device;