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
This commit is contained in:
Erik Andersen
2000-03-22 07:12:05 +00:00
parent 016ffe9307
commit ec5bd90916
8 changed files with 39 additions and 54 deletions

View File

@@ -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;