diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-07 17:55:33 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-07 17:55:33 +0200 |
commit | 5711a2a4ad51ad203a2ed4ffc72593e83920b36a (patch) | |
tree | ef650852b982768fa9c3e4065016e09cbf2d0a96 /shell/ash.c | |
parent | c1e2e005b4e99070f58a3545bad54ef41a634ad1 (diff) | |
download | busybox-w32-5711a2a4ad51ad203a2ed4ffc72593e83920b36a.tar.gz busybox-w32-5711a2a4ad51ad203a2ed4ffc72593e83920b36a.tar.bz2 busybox-w32-5711a2a4ad51ad203a2ed4ffc72593e83920b36a.zip |
libbb: more compact API for bb_parse_mode()
function old new delta
make_device 2182 2188 +6
parse_command 1440 1443 +3
parse_params 1497 1499 +2
install_main 773 769 -4
mkdir_main 168 160 -8
getoptscmd 641 632 -9
builtin_umask 158 147 -11
bb_parse_mode 431 410 -21
umaskcmd 286 258 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/6 up/down: 11/-81) Total: -70 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 80dfc1d6a..ab8ec006f 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -12862,7 +12862,8 @@ umaskcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12862 | /* symbolic umasks are inverted: "umask a=rx" calls umask(222) */ | 12862 | /* symbolic umasks are inverted: "umask a=rx" calls umask(222) */ |
12863 | if (!isdigit(modestr[0])) | 12863 | if (!isdigit(modestr[0])) |
12864 | mask ^= 0777; | 12864 | mask ^= 0777; |
12865 | if (!bb_parse_mode(modestr, &mask) || (unsigned)mask > 0777) { | 12865 | mask = bb_parse_mode(modestr, mask); |
12866 | if ((unsigned)mask > 0777) { | ||
12866 | ash_msg_and_raise_error("illegal mode: %s", modestr); | 12867 | ash_msg_and_raise_error("illegal mode: %s", modestr); |
12867 | } | 12868 | } |
12868 | if (!isdigit(modestr[0])) | 12869 | if (!isdigit(modestr[0])) |