From 10dc9d4d17e6880bfdfd253716ce72ec1243227f Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 26 Jun 2000 10:45:52 +0000 Subject: 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 --- utility.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'utility.c') diff --git a/utility.c b/utility.c index b9c7a76cd..061ba6423 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 +_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; -- cgit v1.2.3