summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-03-01 15:37:12 +0000
committerRon Yorston <rmy@pobox.com>2018-03-01 15:37:12 +0000
commit5b726f8a78c33e117c2a968739b1b4a6964905f8 (patch)
treeaf063c6bf3e99b7480c2fad2dffc2a76c09cb5e0 /util-linux
parent5f8dac68690e92f0be220f8f8d9f797a2aedc806 (diff)
parentcc222747ae7e264cbe9b1c8a9c253860275db8a9 (diff)
downloadbusybox-w32-5b726f8a78c33e117c2a968739b1b4a6964905f8.tar.gz
busybox-w32-5b726f8a78c33e117c2a968739b1b4a6964905f8.tar.bz2
busybox-w32-5b726f8a78c33e117c2a968739b1b4a6964905f8.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mkfs_ext2.c6
-rw-r--r--util-linux/mkfs_vfat.c6
-rw-r--r--util-linux/mount.c6
-rw-r--r--util-linux/switch_root.c6
-rw-r--r--util-linux/umount.c8
5 files changed, 22 insertions, 10 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c
index 8434dd6ad..f524bc239 100644
--- a/util-linux/mkfs_ext2.c
+++ b/util-linux/mkfs_ext2.c
@@ -83,11 +83,11 @@ char BUG_wrong_field_size(void);
83#define STORE_LE(field, value) \ 83#define STORE_LE(field, value) \
84do { \ 84do { \
85 if (sizeof(field) == 4) \ 85 if (sizeof(field) == 4) \
86 field = SWAP_LE32(value); \ 86 field = SWAP_LE32((uint32_t)(value)); \
87 else if (sizeof(field) == 2) \ 87 else if (sizeof(field) == 2) \
88 field = SWAP_LE16(value); \ 88 field = SWAP_LE16((uint16_t)(value)); \
89 else if (sizeof(field) == 1) \ 89 else if (sizeof(field) == 1) \
90 field = (value); \ 90 field = (uint8_t)(value); \
91 else \ 91 else \
92 BUG_wrong_field_size(); \ 92 BUG_wrong_field_size(); \
93} while (0) 93} while (0)
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index 426854b1e..26a919536 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -210,11 +210,11 @@ void BUG_unsupported_field_size(void);
210#define STORE_LE(field, value) \ 210#define STORE_LE(field, value) \
211do { \ 211do { \
212 if (sizeof(field) == 4) \ 212 if (sizeof(field) == 4) \
213 field = SWAP_LE32(value); \ 213 field = SWAP_LE32((uint32_t)(value)); \
214 else if (sizeof(field) == 2) \ 214 else if (sizeof(field) == 2) \
215 field = SWAP_LE16(value); \ 215 field = SWAP_LE16((uint16_t)(value)); \
216 else if (sizeof(field) == 1) \ 216 else if (sizeof(field) == 1) \
217 field = (value); \ 217 field = (uint8_t)(value); \
218 else \ 218 else \
219 BUG_unsupported_field_size(); \ 219 BUG_unsupported_field_size(); \
220} while (0) 220} while (0)
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 4eade0869..fa2e7b114 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -244,7 +244,11 @@
244 * uclibc faq entry rather than in busybox... */ 244 * uclibc faq entry rather than in busybox... */
245# if defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__) 245# if defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__)
246# warning "You probably need to build uClibc with UCLIBC_HAS_RPC for NFS support" 246# warning "You probably need to build uClibc with UCLIBC_HAS_RPC for NFS support"
247 /* not #error, since user may be using e.g. libtirpc instead */ 247 /* not #error, since user may be using e.g. libtirpc instead.
248 * This might work:
249 * CONFIG_EXTRA_CFLAGS="-I/usr/include/tirpc"
250 * CONFIG_EXTRA_LDLIBS="tirpc"
251 */
248# endif 252# endif
249# include <rpc/rpc.h> 253# include <rpc/rpc.h>
250# include <rpc/pmap_prot.h> 254# include <rpc/pmap_prot.h>
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index 2d1802b79..947dd0cdc 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -39,6 +39,12 @@
39#include <sys/mount.h> 39#include <sys/mount.h>
40#if ENABLE_RUN_INIT 40#if ENABLE_RUN_INIT
41# include <sys/prctl.h> 41# include <sys/prctl.h>
42# ifndef PR_CAPBSET_READ
43# define PR_CAPBSET_READ 23
44# endif
45# ifndef PR_CAPBSET_DROP
46# define PR_CAPBSET_DROP 24
47# endif
42# include <linux/capability.h> 48# include <linux/capability.h>
43// #include <sys/capability.h> 49// #include <sys/capability.h>
44// This header is in libcap, but the functions are in libc. 50// This header is in libcap, but the functions are in libc.
diff --git a/util-linux/umount.c b/util-linux/umount.c
index b45cd8a6b..e2329f8b3 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -57,6 +57,7 @@
57//usage: IF_FEATURE_MOUNT_LOOP( 57//usage: IF_FEATURE_MOUNT_LOOP(
58//usage: "\n -d Free loop device if it has been used" 58//usage: "\n -d Free loop device if it has been used"
59//usage: ) 59//usage: )
60//usage: "\n -t FSTYPE[,...] Unmount only these filesystem type(s)"
60//usage: 61//usage:
61//usage:#define umount_example_usage 62//usage:#define umount_example_usage
62//usage: "$ umount /dev/hdc1\n" 63//usage: "$ umount /dev/hdc1\n"
@@ -81,8 +82,8 @@ static struct mntent *getmntent_r(FILE* stream, struct mntent* result,
81} 82}
82#endif 83#endif
83 84
84/* ignored: -c -v -t -i */ 85/* ignored: -c -v -i */
85#define OPTION_STRING "fldnra" "cvt:i" 86#define OPTION_STRING "fldnrat:" "cvi"
86#define OPT_FORCE (1 << 0) // Same as MNT_FORCE 87#define OPT_FORCE (1 << 0) // Same as MNT_FORCE
87#define OPT_LAZY (1 << 1) // Same as MNT_DETACH 88#define OPT_LAZY (1 << 1) // Same as MNT_DETACH
88#define OPT_FREELOOP (1 << 2) 89#define OPT_FREELOOP (1 << 2)
@@ -143,7 +144,8 @@ int umount_main(int argc UNUSED_PARAM, char **argv)
143 } 144 }
144 145
145 // If we're not umounting all, we need at least one argument. 146 // If we're not umounting all, we need at least one argument.
146 if (!(opt & OPT_ALL) && !fstype) { 147 // Note: "-t FSTYPE" does not imply -a.
148 if (!(opt & OPT_ALL)) {
147 if (!argv[0]) 149 if (!argv[0])
148 bb_show_usage(); 150 bb_show_usage();
149 m = NULL; 151 m = NULL;