diff options
author | Eric Andersen | 2000-06-26 10:45:52 +0000 |
---|---|---|
committer | Eric Andersen | 2000-06-26 10:45:52 +0000 |
commit | 10dc9d4d17e6880bfdfd253716ce72ec1243227f (patch) | |
tree | f3c2aa6ab3dadf1b4bf710c7957e72faddebd75f /uptime.c | |
parent | 8a24a6783af7a0d54b1f2ebcda5b07757bd19c99 (diff) | |
download | busybox-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 'uptime.c')
-rw-r--r-- | uptime.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |