summaryrefslogtreecommitdiff
path: root/mount.c
diff options
context:
space:
mode:
authorEric Andersen2000-06-26 10:45:52 +0000
committerEric Andersen2000-06-26 10:45:52 +0000
commit10dc9d4d17e6880bfdfd253716ce72ec1243227f (patch)
treef3c2aa6ab3dadf1b4bf710c7957e72faddebd75f /mount.c
parent8a24a6783af7a0d54b1f2ebcda5b07757bd19c99 (diff)
downloadbusybox-10dc9d4d17e6880bfdfd253716ce72ec1243227f.zip
busybox-10dc9d4d17e6880bfdfd253716ce72ec1243227f.tar.gz
Updates to handle Linux 2.4.0 kernels (kludged around the "none" entries in
/proc/mounts, added a hack to make sysinfo work with both old and new kernels). -Erik
Diffstat (limited to 'mount.c')
-rw-r--r--mount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mount.c b/mount.c
index 76f048b..292be0c 100644
--- a/mount.c
+++ b/mount.c
@@ -358,6 +358,10 @@ extern int mount_main(int argc, char **argv)
fatalError( "\nDEVMTAB_GET_MOUNTS: %s\n", strerror (errno));
for( i = 0 ; i < numfilesystems ; i++) {
+ /* klude around Linux 2.4.x stupidity */
+ if (strcmp(mntentlist[i].mnt_fsname, "none") == 0) {
+ continue;
+ }
fprintf( stdout, "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname,
mntentlist[i].mnt_dir, mntentlist[i].mnt_type,
mntentlist[i].mnt_opts, mntentlist[i].mnt_freq,
@@ -380,6 +384,10 @@ extern int mount_main(int argc, char **argv)
while ((m = getmntent(mountTable)) != 0) {
char *blockDevice = m->mnt_fsname;
+ /* klude around Linux 2.4.x stupidity */
+ if (strcmp(blockDevice, "none") == 0) {
+ continue;
+ }
if (strcmp(blockDevice, "/dev/root") == 0) {
find_real_root_device_name( blockDevice);
}