diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-03-22 07:12:05 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-03-22 07:12:05 +0000 |
commit | ec5bd90916b6e815a36c14ac04d1b78e3e487400 (patch) | |
tree | 3602e12b02fe289306dccfb27fba31fda53db690 /umount.c | |
parent | 016ffe93077975b01e84493d7cc303f78f70441a (diff) | |
download | busybox-w32-ec5bd90916b6e815a36c14ac04d1b78e3e487400.tar.gz busybox-w32-ec5bd90916b6e815a36c14ac04d1b78e3e487400.tar.bz2 busybox-w32-ec5bd90916b6e815a36c14ac04d1b78e3e487400.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
Diffstat (limited to 'umount.c')
-rw-r--r-- | umount.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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; |