diff options
author | Denys Vlasenko | 2010-03-06 20:12:00 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-03-06 20:12:00 +0100 |
commit | f3c742f925c31bdf1b0d52c82e0ef608a344e10f (patch) | |
tree | c74cf752e03ef906fc74014882843640262a2322 /shell/builtin_ulimit.h | |
parent | cbcc1236f806f18e6386e6e1f495a9832b7d307d (diff) | |
download | busybox-f3c742f925c31bdf1b0d52c82e0ef608a344e10f.zip busybox-f3c742f925c31bdf1b0d52c82e0ef608a344e10f.tar.gz |
hush: use ash's ulimit builtin; make it more more bash0like while at it
Based on a patch by Tobias Klauser <tklauser@distanz.ch>
function old new delta
shell_builtin_ulimit - 498 +498
limits_tbl 33 88 +55
ulimit_opt_string - 38 +38
bltins1 288 300 +12
limits_name 127 - -127
ulimitcmd 415 7 -408
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/1 up/down: 603/-535) Total: 68 bytes
text data bss dec hex filename
839229 453 6828 846510 ceaae busybox_old
839423 453 6828 846704 ceb70 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/builtin_ulimit.h')
-rw-r--r-- | shell/builtin_ulimit.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/shell/builtin_ulimit.h b/shell/builtin_ulimit.h new file mode 100644 index 0000000..ec1af78 --- /dev/null +++ b/shell/builtin_ulimit.h @@ -0,0 +1,19 @@ +/* vi: set sw=4 ts=4: */ +/* + * Adapted from ash applet code + * + * Copyright (c) 2010 Tobias Klauser + * Split from ash.c and slightly adapted. + * + * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. + */ +#ifndef SHELL_BUILTIN_ULIMIT_H +#define SHELL_BUILTIN_ULIMIT_H 1 + +PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN + +int FAST_FUNC shell_builtin_ulimit(char **argv); + +POP_SAVED_FUNCTION_VISIBILITY + +#endif |