aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-06 20:12:00 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-06 20:12:00 +0100
commitf3c742f925c31bdf1b0d52c82e0ef608a344e10f (patch)
treec74cf752e03ef906fc74014882843640262a2322 /shell/hush.c
parentcbcc1236f806f18e6386e6e1f495a9832b7d307d (diff)
downloadbusybox-w32-f3c742f925c31bdf1b0d52c82e0ef608a344e10f.tar.gz
busybox-w32-f3c742f925c31bdf1b0d52c82e0ef608a344e10f.tar.bz2
busybox-w32-f3c742f925c31bdf1b0d52c82e0ef608a344e10f.zip
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/hush.c')
-rw-r--r--shell/hush.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 0310b02ed..6f391b881 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -57,7 +57,6 @@
57 * 57 *
58 * TODOs: 58 * TODOs:
59 * grep for "TODO" and fix (some of them are easy) 59 * grep for "TODO" and fix (some of them are easy)
60 * builtins: ulimit
61 * special variables (done: PWD) 60 * special variables (done: PWD)
62 * follow IFS rules more precisely, including update semantics 61 * follow IFS rules more precisely, including update semantics
63 * export builtin should be special, its arguments are assignments 62 * export builtin should be special, its arguments are assignments
@@ -87,6 +86,7 @@
87 86
88#include "shell_common.h" 87#include "shell_common.h"
89#include "builtin_read.h" 88#include "builtin_read.h"
89#include "builtin_ulimit.h"
90#include "math.h" 90#include "math.h"
91#include "match.h" 91#include "match.h"
92#if ENABLE_HUSH_RANDOM_SUPPORT 92#if ENABLE_HUSH_RANDOM_SUPPORT
@@ -671,7 +671,7 @@ static const struct built_in_command bltins1[] = {
671 BLTIN("shift" , builtin_shift , "Shift positional parameters"), 671 BLTIN("shift" , builtin_shift , "Shift positional parameters"),
672 BLTIN("trap" , builtin_trap , "Trap signals"), 672 BLTIN("trap" , builtin_trap , "Trap signals"),
673 BLTIN("type" , builtin_type , "Write a description of command type"), 673 BLTIN("type" , builtin_type , "Write a description of command type"),
674// BLTIN("ulimit" , builtin_ulimit , "Control resource limits"), 674 BLTIN("ulimit" , shell_builtin_ulimit , "Control resource limits"),
675 BLTIN("umask" , builtin_umask , "Set file creation mask"), 675 BLTIN("umask" , builtin_umask , "Set file creation mask"),
676 BLTIN("unset" , builtin_unset , "Unset variables"), 676 BLTIN("unset" , builtin_unset , "Unset variables"),
677 BLTIN("wait" , builtin_wait , "Wait for process"), 677 BLTIN("wait" , builtin_wait , "Wait for process"),