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
This commit is contained in:
Eric Andersen
2000-06-26 10:45:52 +00:00
parent 8a24a6783a
commit 10dc9d4d17
14 changed files with 159 additions and 47 deletions

View File

@@ -31,13 +31,14 @@
#include "internal.h"
#include <stdio.h>
#include <time.h>
#include <sys/sysinfo.h>
#include <errno.h>
#define FSHIFT 16 /* nr of bits of precision */
#define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */
#define LOAD_INT(x) ((x) >> FSHIFT)
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
extern int uptime_main(int argc, char **argv)
{
int updays, uphours, upminutes;