aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-06-26 10:45:52 +0000
committerEric Andersen <andersen@codepoet.org>2000-06-26 10:45:52 +0000
commit10dc9d4d17e6880bfdfd253716ce72ec1243227f (patch)
treef3c2aa6ab3dadf1b4bf710c7957e72faddebd75f /util-linux
parent8a24a6783af7a0d54b1f2ebcda5b07757bd19c99 (diff)
downloadbusybox-w32-10dc9d4d17e6880bfdfd253716ce72ec1243227f.tar.gz
busybox-w32-10dc9d4d17e6880bfdfd253716ce72ec1243227f.tar.bz2
busybox-w32-10dc9d4d17e6880bfdfd253716ce72ec1243227f.zip
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 'util-linux')
-rw-r--r--util-linux/mount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 76f048b1c..292be0c43 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -358,6 +358,10 @@ extern int mount_main(int argc, char **argv)
358 fatalError( "\nDEVMTAB_GET_MOUNTS: %s\n", strerror (errno)); 358 fatalError( "\nDEVMTAB_GET_MOUNTS: %s\n", strerror (errno));
359 359
360 for( i = 0 ; i < numfilesystems ; i++) { 360 for( i = 0 ; i < numfilesystems ; i++) {
361 /* klude around Linux 2.4.x stupidity */
362 if (strcmp(mntentlist[i].mnt_fsname, "none") == 0) {
363 continue;
364 }
361 fprintf( stdout, "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname, 365 fprintf( stdout, "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname,
362 mntentlist[i].mnt_dir, mntentlist[i].mnt_type, 366 mntentlist[i].mnt_dir, mntentlist[i].mnt_type,
363 mntentlist[i].mnt_opts, mntentlist[i].mnt_freq, 367 mntentlist[i].mnt_opts, mntentlist[i].mnt_freq,
@@ -380,6 +384,10 @@ extern int mount_main(int argc, char **argv)
380 384
381 while ((m = getmntent(mountTable)) != 0) { 385 while ((m = getmntent(mountTable)) != 0) {
382 char *blockDevice = m->mnt_fsname; 386 char *blockDevice = m->mnt_fsname;
387 /* klude around Linux 2.4.x stupidity */
388 if (strcmp(blockDevice, "none") == 0) {
389 continue;
390 }
383 if (strcmp(blockDevice, "/dev/root") == 0) { 391 if (strcmp(blockDevice, "/dev/root") == 0) {
384 find_real_root_device_name( blockDevice); 392 find_real_root_device_name( blockDevice);
385 } 393 }