summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko2009-11-25 14:52:47 +0100
committerDenys Vlasenko2009-11-25 14:52:47 +0100
commitb2e5fc35ebc127e2a1ac03c7ff0719b1e6b6cd6b (patch)
tree21c86016df03253513c3bbe80fc7eef71b209d68 /util-linux
parent18221506e5aeb9c279b73bc9418b60c75b10399a (diff)
downloadbusybox-b2e5fc35ebc127e2a1ac03c7ff0719b1e6b6cd6b.zip
busybox-b2e5fc35ebc127e2a1ac03c7ff0719b1e6b6cd6b.tar.gz
ntpd: and real handling for -N, show usage w/o options; trim text
function old new delta ntp_init 317 348 +31 bb_msg_you_must_be_root - 17 +17 xsocket 66 76 +10 changepath 195 194 -1 bb_msg_perm_denied_are_you_root 35 34 -1 send_tree 355 353 -2 count_lines 74 72 -2 must_be_root 17 - -17 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 2/4 up/down: 58/-23) Total: 35 bytes text data bss dec hexfilename 832873 441 7548 840862 cd49ebusybox_old 832839 441 7548 840828 cd47cbusybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 271e691..d27d65f 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -1801,8 +1801,6 @@ static int match_opt(const char *fs_opt, const char *O_opt)
// Parse options, if necessary parse fstab/mtab, and call singlemount for
// each directory to be mounted.
-static const char must_be_root[] ALIGN1 = "you must be root";
-
int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mount_main(int argc UNUSED_PARAM, char **argv)
{
@@ -1871,7 +1869,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
// argument when we get it.
if (argv[1]) {
if (nonroot)
- bb_error_msg_and_die(must_be_root);
+ bb_error_msg_and_die(bb_msg_you_must_be_root);
mtpair->mnt_fsname = argv[0];
mtpair->mnt_dir = argv[1];
mtpair->mnt_type = fstype;
@@ -1888,7 +1886,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
i = parse_mount_options(cmdopts, NULL); // FIXME: should be "long", not "int"
if (nonroot && (i & ~MS_SILENT)) // Non-root users cannot specify flags
- bb_error_msg_and_die(must_be_root);
+ bb_error_msg_and_die(bb_msg_you_must_be_root);
// If we have a shared subtree flag, don't worry about fstab or mtab.
if (ENABLE_FEATURE_MOUNT_FLAGS
@@ -1947,7 +1945,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
// No, mount -a won't mount anything,
// even user mounts, for mere humans
if (nonroot)
- bb_error_msg_and_die(must_be_root);
+ bb_error_msg_and_die(bb_msg_you_must_be_root);
// Does type match? (NULL matches always)
if (!match_fstype(mtcur, fstype))
@@ -2012,7 +2010,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
// fstab must have "users" or "user"
l = parse_mount_options(mtcur->mnt_opts, NULL);
if (!(l & MOUNT_USERS))
- bb_error_msg_and_die(must_be_root);
+ bb_error_msg_and_die(bb_msg_you_must_be_root);
}
// Mount the last thing we found