Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-03-22 10:12:05 +0300
committerErik Andersen <andersen@codepoet.org>2000-03-22 10:12:05 +0300
commitec5bd90916b6e815a36c14ac04d1b78e3e487400 (patch)
tree3602e12b02fe289306dccfb27fba31fda53db690 /umount.c
parent016ffe93077975b01e84493d7cc303f78f70441a (diff)
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
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 @@
#include <stdio.h>
#include <sys/mount.h>
#include <mntent.h>
-#include <fstab.h>
#include <errno.h>
@@ -110,11 +109,10 @@ char *mtab_getinfo(const char *match, const char which)
} else {
#if !defined BB_MTAB
if (strcmp(cur->device, "/dev/root") == 0) {
- struct fstab *fstabItem;
-
- fstabItem = getfsfile("/");
- if (fstabItem != NULL)
- return fstabItem->fs_spec;
+ /* Adjusts device to be the real root device,
+ * or leaves device alone if it can't find it */
+ find_real_root_device_name( cur->device);
+ return ( cur->device);
}
#endif
return cur->device;