summaryrefslogtreecommitdiff
path: root/utility.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 /utility.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 'utility.c')
-rw-r--r--utility.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/utility.c b/utility.c
index b9c7a76..061ba64 100644
--- a/utility.c
+++ b/utility.c
@@ -131,6 +131,15 @@ extern int get_kernel_revision(void)
}
#endif /* BB_INIT */
+
+
+#if defined BB_FREE || defined BB_INIT || defined BB_UNAME || defined BB_UPTIME
+#include <sys/syscall.h>
+_syscall1(int, sysinfo, struct sysinfo *, info);
+#endif /* BB_INIT */
+
+
+
#if defined (BB_CP_MV) || defined (BB_DU)
#define HASH_SIZE 311 /* Should be prime */
@@ -1189,6 +1198,9 @@ extern struct mntent *findMountPoint(const char *name, const char *table)
return 0;
while ((mountEntry = getmntent(mountTable)) != 0) {
+ if (strcmp(mountEntry->mnt_fsname, "none") == 0) {
+ continue;
+ }
if (strcmp(name, mountEntry->mnt_dir) == 0
|| strcmp(name, mountEntry->mnt_fsname) == 0) /* String match. */
break;