diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-07-08 18:55:24 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-07-08 18:55:24 +0000 |
commit | bd22ed806782eec76929bcd2ec556717e79d24c7 (patch) | |
tree | e225367aaef198eacec8ed0b530d36a9d888d92f /util-linux | |
parent | 877a71bbf0b8386add4631c08f7101259ad2dc07 (diff) | |
download | busybox-w32-bd22ed806782eec76929bcd2ec556717e79d24c7.tar.gz busybox-w32-bd22ed806782eec76929bcd2ec556717e79d24c7.tar.bz2 busybox-w32-bd22ed806782eec76929bcd2ec556717e79d24c7.zip |
Update files to reduce dependance on kernel version...
-Erik
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/dmesg.c | 2 | ||||
-rw-r--r-- | util-linux/fdflush.c | 3 | ||||
-rw-r--r-- | util-linux/mount.c | 8 | ||||
-rw-r--r-- | util-linux/umount.c | 20 |
4 files changed, 18 insertions, 15 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 20846f7c6..e88f549ca 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
@@ -16,7 +16,6 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "internal.h" | 18 | #include "internal.h" |
19 | #include <linux/unistd.h> | ||
20 | #include <stdio.h> | 19 | #include <stdio.h> |
21 | #include <stdlib.h> | 20 | #include <stdlib.h> |
22 | 21 | ||
@@ -24,6 +23,7 @@ | |||
24 | 23 | ||
25 | #ifndef __alpha__ | 24 | #ifndef __alpha__ |
26 | # define __NR_klogctl __NR_syslog | 25 | # define __NR_klogctl __NR_syslog |
26 | #include <linux/unistd.h> | ||
27 | static inline _syscall3(int, klogctl, int, type, char *, b, int, len); | 27 | static inline _syscall3(int, klogctl, int, type, char *, b, int, len); |
28 | #else /* __alpha__ */ | 28 | #else /* __alpha__ */ |
29 | #define klogctl syslog | 29 | #define klogctl syslog |
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c index 81f0472c6..d9937355f 100644 --- a/util-linux/fdflush.c +++ b/util-linux/fdflush.c | |||
@@ -24,9 +24,10 @@ | |||
24 | #include "internal.h" | 24 | #include "internal.h" |
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | #include <sys/ioctl.h> | 26 | #include <sys/ioctl.h> |
27 | #include <linux/fd.h> | ||
28 | #include <fcntl.h> | 27 | #include <fcntl.h> |
29 | 28 | ||
29 | /* From <linux/fd.h> */ | ||
30 | #define FDFLUSH _IO(2,0x4b) | ||
30 | 31 | ||
31 | extern int fdflush_main(int argc, char **argv) | 32 | extern int fdflush_main(int argc, char **argv) |
32 | { | 33 | { |
diff --git a/util-linux/mount.c b/util-linux/mount.c index 76f048b1c..01e9b3d67 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -48,15 +48,17 @@ | |||
48 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 48 | #if defined BB_FEATURE_USE_DEVPS_PATCH |
49 | #include <linux/devmtab.h> | 49 | #include <linux/devmtab.h> |
50 | #endif | 50 | #endif |
51 | #ifndef MS_RDONLY | 51 | |
52 | #include <linux/fs.h> | 52 | /* 2.0.x. kernels don't know about MS_NODIRATIME */ |
53 | #ifndef MS_NODIRATIME | ||
54 | #define MS_NODIRATIME 2048 /* Do not update directory access times */ | ||
53 | #endif | 55 | #endif |
54 | 56 | ||
55 | 57 | ||
58 | |||
56 | #if defined BB_FEATURE_MOUNT_LOOP | 59 | #if defined BB_FEATURE_MOUNT_LOOP |
57 | #include <fcntl.h> | 60 | #include <fcntl.h> |
58 | #include <sys/ioctl.h> | 61 | #include <sys/ioctl.h> |
59 | #include <linux/loop.h> | ||
60 | 62 | ||
61 | 63 | ||
62 | static int use_loop = FALSE; | 64 | static int use_loop = FALSE; |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 61f7f9028..d790d68ff 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -26,20 +26,20 @@ | |||
26 | #include <stdio.h> | 26 | #include <stdio.h> |
27 | #include <mntent.h> | 27 | #include <mntent.h> |
28 | #include <errno.h> | 28 | #include <errno.h> |
29 | #include <sys/mount.h> | ||
29 | #include <linux/unistd.h> | 30 | #include <linux/unistd.h> |
30 | 31 | ||
31 | 32 | ||
32 | //#include <sys/mount.h> | 33 | /* Include our own version of umount2 if we need it... */ |
33 | /* Include our own version of sys/mount.h, since libc5 doesn't | 34 | #ifndef __NR_umount2 |
34 | * know about umount2 */ | 35 | #define __NR_umount2 52 |
35 | static _syscall1(int, umount, const char *, special_file); | ||
36 | static _syscall2(int, umount2, const char *, special_file, int, flags); | ||
37 | static _syscall5(int, mount, const char *, special_file, const char *, dir, | ||
38 | const char *, fstype, unsigned long int, rwflag, const void *, data); | ||
39 | #define MNT_FORCE 1 | 36 | #define MNT_FORCE 1 |
40 | #define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */ | 37 | #define MS_MGC_VAL 0xc0ed0000 /* Magic number indicatng "new" flags */ |
41 | #define MS_REMOUNT 32 /* Alter flags of a mounted FS. */ | 38 | #define MS_REMOUNT 32 /* Alter flags of a mounted FS. */ |
42 | #define MS_RDONLY 1 /* Mount read-only. */ | 39 | #define MS_RDONLY 1 /* Mount read-only. */ |
40 | |||
41 | #endif | ||
42 | static _syscall2(int, umount2, const char *, special_file, int, flags); | ||
43 | 43 | ||
44 | 44 | ||
45 | static const char umount_usage[] = | 45 | static const char umount_usage[] = |