diff options
author | Rob Landley <rob@landley.net> | 2006-06-15 15:49:36 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-15 15:49:36 +0000 |
commit | 22d26fc6ae2af584482deaf92f25bb6a7261ad78 (patch) | |
tree | 3e9e7c2b43314acdd1f4db7e3a89a3c69daf814a | |
parent | d6e5083d16c940e36312f4a1b52317dcfc32c011 (diff) | |
download | busybox-w32-22d26fc6ae2af584482deaf92f25bb6a7261ad78.tar.gz busybox-w32-22d26fc6ae2af584482deaf92f25bb6a7261ad78.tar.bz2 busybox-w32-22d26fc6ae2af584482deaf92f25bb6a7261ad78.zip |
Patch from Yann Morin to put BLKGETSIZE64 in platform.h had rather a lot of
fallout due to the #include <sys/mount.h>. Removed that #include from various
applets and fixed up those that were unhappy when that #include was made
because they'd block copied stuff out of it. (Sigh.)
-rw-r--r-- | include/platform.h | 5 | ||||
-rw-r--r-- | miscutils/eject.c | 1 | ||||
-rw-r--r-- | miscutils/hdparm.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk.c | 5 | ||||
-rw-r--r-- | util-linux/mount.c | 8 | ||||
-rw-r--r-- | util-linux/nfsmount.c | 20 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 5 | ||||
-rw-r--r-- | util-linux/switch_root.c | 7 | ||||
-rw-r--r-- | util-linux/umount.c | 6 |
9 files changed, 10 insertions, 49 deletions
diff --git a/include/platform.h b/include/platform.h index 3e1229e9d..5dbfb7783 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -242,8 +242,11 @@ typedef unsigned long long int uintmax_t; | |||
242 | #define bb_setpgrp setpgrp() | 242 | #define bb_setpgrp setpgrp() |
243 | #endif | 243 | #endif |
244 | 244 | ||
245 | #if defined(__linux__) && !defined(BLKGETSIZE64) | 245 | #if defined(__linux__) |
246 | #include <sys/mount.h> | ||
247 | #if !defined(BLKGETSIZE64) | ||
246 | #define BLKGETSIZE64 _IOR(0x12,114,size_t) | 248 | #define BLKGETSIZE64 _IOR(0x12,114,size_t) |
247 | #endif | 249 | #endif |
250 | #endif | ||
248 | 251 | ||
249 | #endif /* platform.h */ | 252 | #endif /* platform.h */ |
diff --git a/miscutils/eject.c b/miscutils/eject.c index a402e49c6..8ac66779a 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <fcntl.h> | 17 | #include <fcntl.h> |
18 | #include <sys/ioctl.h> | 18 | #include <sys/ioctl.h> |
19 | #include <unistd.h> | 19 | #include <unistd.h> |
20 | #include <sys/mount.h> | ||
21 | #include <mntent.h> | 20 | #include <mntent.h> |
22 | 21 | ||
23 | /* various defines swiped from linux/cdrom.h */ | 22 | /* various defines swiped from linux/cdrom.h */ |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 81e7c6e4c..925644e1f 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -14,14 +14,12 @@ | |||
14 | 14 | ||
15 | #include "busybox.h" | 15 | #include "busybox.h" |
16 | #include <string.h> | 16 | #include <string.h> |
17 | #include <stdlib.h> | ||
18 | #include <fcntl.h> | 17 | #include <fcntl.h> |
19 | #include <errno.h> | 18 | #include <errno.h> |
20 | #include <ctype.h> | 19 | #include <ctype.h> |
21 | #include <sys/ioctl.h> | 20 | #include <sys/ioctl.h> |
22 | #include <sys/sysmacros.h> | 21 | #include <sys/sysmacros.h> |
23 | #include <sys/times.h> | 22 | #include <sys/times.h> |
24 | #include <sys/mount.h> | ||
25 | #include <sys/mman.h> | 23 | #include <sys/mman.h> |
26 | #include <linux/types.h> | 24 | #include <linux/types.h> |
27 | #include <linux/hdreg.h> | 25 | #include <linux/hdreg.h> |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 5ef5acb1b..cd8252649 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -43,11 +43,6 @@ | |||
43 | 43 | ||
44 | #define DKTYPENAMES | 44 | #define DKTYPENAMES |
45 | 45 | ||
46 | #define BLKRRPART _IO(0x12,95) /* re-read partition table */ | ||
47 | #define BLKGETSIZE _IO(0x12,96) /* return device size */ | ||
48 | #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ | ||
49 | #define BLKSSZGET _IO(0x12,104) /* get block device sector size */ | ||
50 | |||
51 | /* | 46 | /* |
52 | fdisk.h | 47 | fdisk.h |
53 | */ | 48 | */ |
diff --git a/util-linux/mount.c b/util-linux/mount.c index e1c1c601b..9225289b6 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * bb_getopt_ulflags(); | 13 | * bb_getopt_ulflags(); |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /* Design notes: There is no spec for this. Remind me to write one. | 16 | /* Design notes: There is no spec for mount. Remind me to write one. |
17 | 17 | ||
18 | mount_main() calls singlemount() which calls mount_it_now(). | 18 | mount_main() calls singlemount() which calls mount_it_now(). |
19 | 19 | ||
@@ -22,18 +22,14 @@ | |||
22 | mount_it_now() does the actual mount. | 22 | mount_it_now() does the actual mount. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <limits.h> | 25 | #include "busybox.h" |
26 | #include <stdlib.h> | ||
27 | #include <unistd.h> | 26 | #include <unistd.h> |
28 | #include <errno.h> | 27 | #include <errno.h> |
29 | #include <string.h> | 28 | #include <string.h> |
30 | #include <stdio.h> | ||
31 | #include <mntent.h> | 29 | #include <mntent.h> |
32 | #include <ctype.h> | 30 | #include <ctype.h> |
33 | #include <sys/mount.h> | ||
34 | #include <fcntl.h> // for CONFIG_FEATURE_MOUNT_LOOP | 31 | #include <fcntl.h> // for CONFIG_FEATURE_MOUNT_LOOP |
35 | #include <sys/ioctl.h> // for CONFIG_FEATURE_MOUNT_LOOP | 32 | #include <sys/ioctl.h> // for CONFIG_FEATURE_MOUNT_LOOP |
36 | #include "busybox.h" | ||
37 | 33 | ||
38 | // These two aren't always defined in old headers | 34 | // These two aren't always defined in old headers |
39 | #ifndef MS_BIND | 35 | #ifndef MS_BIND |
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index 619add483..d46cf698a 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
@@ -33,18 +33,12 @@ | |||
33 | * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp | 33 | * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include "busybox.h" | ||
36 | #include <unistd.h> | 37 | #include <unistd.h> |
37 | #include <stdio.h> | ||
38 | #include <string.h> | 38 | #include <string.h> |
39 | #include <errno.h> | 39 | #include <errno.h> |
40 | #include <netdb.h> | ||
41 | #include <sys/socket.h> | ||
42 | #include <time.h> | 40 | #include <time.h> |
43 | #include <sys/utsname.h> | 41 | #include <sys/utsname.h> |
44 | #include <netinet/in.h> | ||
45 | #include <arpa/inet.h> | ||
46 | #include <stdlib.h> | ||
47 | #include "busybox.h" | ||
48 | #undef TRUE | 42 | #undef TRUE |
49 | #undef FALSE | 43 | #undef FALSE |
50 | #include <rpc/rpc.h> | 44 | #include <rpc/rpc.h> |
@@ -121,19 +115,7 @@ enum { | |||
121 | # define textdomain(Domain) /* empty */ | 115 | # define textdomain(Domain) /* empty */ |
122 | 116 | ||
123 | enum { | 117 | enum { |
124 | MS_MGC_VAL = 0xc0ed0000, /* Magic number indicatng "new" flags */ | ||
125 | MS_RDONLY = 1, /* Mount read-only */ | ||
126 | MS_NOSUID = 2, /* Ignore suid and sgid bits */ | ||
127 | MS_NODEV = 4, /* Disallow access to device special files */ | ||
128 | MS_NOEXEC = 8, /* Disallow program execution */ | ||
129 | MS_SYNCHRONOUS = 16, /* Writes are synced at once */ | ||
130 | MS_REMOUNT = 32, /* Alter flags of a mounted FS */ | ||
131 | MS_MANDLOCK = 64, /* Allow mandatory locks on an FS */ | ||
132 | S_QUOTA = 128, /* Quota initialized for file/directory/symlink */ | 118 | S_QUOTA = 128, /* Quota initialized for file/directory/symlink */ |
133 | S_APPEND = 256, /* Append-only file */ | ||
134 | S_IMMUTABLE = 512, /* Immutable file */ | ||
135 | MS_NOATIME = 1024, /* Do not update access times. */ | ||
136 | MS_NODIRATIME = 2048 /* Do not update directory access times */ | ||
137 | }; | 119 | }; |
138 | 120 | ||
139 | 121 | ||
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 473325d0c..9bb70a1f5 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -7,16 +7,13 @@ | |||
7 | * Licensed under the GPL v2, see the file LICENSE in this tarball. | 7 | * Licensed under the GPL v2, see the file LICENSE in this tarball. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <stdio.h> | 10 | #include "busybox.h" |
11 | #include <mntent.h> | 11 | #include <mntent.h> |
12 | #include <dirent.h> | 12 | #include <dirent.h> |
13 | #include <errno.h> | 13 | #include <errno.h> |
14 | #include <string.h> | 14 | #include <string.h> |
15 | #include <stdlib.h> | ||
16 | #include <sys/mount.h> | ||
17 | #include <sys/swap.h> | 15 | #include <sys/swap.h> |
18 | 16 | ||
19 | #include "busybox.h" | ||
20 | 17 | ||
21 | static int swap_enable_disable(const char *device) | 18 | static int swap_enable_disable(const char *device) |
22 | { | 19 | { |
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 9815a6d9e..8e564f0bf 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
@@ -6,17 +6,12 @@ | |||
6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <dirent.h> | 9 | #include "busybox.h" |
10 | #include <fcntl.h> | 10 | #include <fcntl.h> |
11 | #include <stdio.h> | ||
12 | #include <string.h> | 11 | #include <string.h> |
13 | #include <sys/mount.h> | ||
14 | #include <sys/stat.h> | ||
15 | #include <sys/types.h> | ||
16 | #include <sys/vfs.h> | 12 | #include <sys/vfs.h> |
17 | #include <unistd.h> | 13 | #include <unistd.h> |
18 | 14 | ||
19 | #include "busybox.h" | ||
20 | 15 | ||
21 | // Make up for header deficiencies. | 16 | // Make up for header deficiencies. |
22 | 17 | ||
diff --git a/util-linux/umount.c b/util-linux/umount.c index 7efb636db..b5696f78b 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -11,15 +11,11 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <limits.h> | 14 | #include "busybox.h" |
15 | #include <stdio.h> | ||
16 | #include <mntent.h> | 15 | #include <mntent.h> |
17 | #include <errno.h> | 16 | #include <errno.h> |
18 | #include <string.h> | 17 | #include <string.h> |
19 | #include <stdlib.h> | ||
20 | #include <sys/mount.h> | ||
21 | #include <getopt.h> | 18 | #include <getopt.h> |
22 | #include "busybox.h" | ||
23 | 19 | ||
24 | #define OPTION_STRING "flDnrvad" | 20 | #define OPTION_STRING "flDnrvad" |
25 | #define OPT_FORCE 1 | 21 | #define OPT_FORCE 1 |