From 15e97e9d2a52ed70a4b13c5acad29a55d73b2484 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 22 Mar 2000 07:12:05 +0000 Subject: 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 --- umount.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'umount.c') diff --git a/umount.c b/umount.c index 6661db878..c34bf5fc3 100644 --- a/umount.c +++ b/umount.c @@ -26,7 +26,6 @@ #include #include #include -#include #include @@ -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; -- cgit v1.2.3-55-g6feb