aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-01-08 18:44:41 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2017-01-08 18:44:41 +0100
commit4471969db2102df9c97582b6577c7505caf64a34 (patch)
tree5525ff927b943f879070675f86280d006a925dbe /shell
parent6ec76d8719279dbda0b2a98163625b6f2ea013ff (diff)
downloadbusybox-w32-4471969db2102df9c97582b6577c7505caf64a34.tar.gz
busybox-w32-4471969db2102df9c97582b6577c7505caf64a34.tar.bz2
busybox-w32-4471969db2102df9c97582b6577c7505caf64a34.zip
hush: make memleak builtin optional
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 153867614..3050aeb8e 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -286,6 +286,13 @@
286//config: help 286//config: help
287//config: Enable umask builtin in hush. 287//config: Enable umask builtin in hush.
288//config: 288//config:
289//config:config HUSH_MEMLEAK
290//config: bool "memleak builtin (debugging)"
291//config: default n
292//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
293//config: help
294//config: Enable umask builtin in hush.
295//config:
289//config:config MSH 296//config:config MSH
290//config: bool "msh (deprecated: aliased to hush)" 297//config: bool "msh (deprecated: aliased to hush)"
291//config: default n 298//config: default n
@@ -897,8 +904,10 @@ struct globals {
897# define G_traps ((char**)NULL) 904# define G_traps ((char**)NULL)
898#endif 905#endif
899 sigset_t pending_set; 906 sigset_t pending_set;
900#if HUSH_DEBUG 907#if ENABLE_HUSH_MEMLEAK
901 unsigned long memleak_value; 908 unsigned long memleak_value;
909#endif
910#if HUSH_DEBUG
902 int debug_indent; 911 int debug_indent;
903#endif 912#endif
904 struct sigaction sa; 913 struct sigaction sa;
@@ -940,7 +949,7 @@ static int builtin_history(char **argv) FAST_FUNC;
940#if ENABLE_HUSH_LOCAL 949#if ENABLE_HUSH_LOCAL
941static int builtin_local(char **argv) FAST_FUNC; 950static int builtin_local(char **argv) FAST_FUNC;
942#endif 951#endif
943#if HUSH_DEBUG 952#if ENABLE_HUSH_MEMLEAK
944static int builtin_memleak(char **argv) FAST_FUNC; 953static int builtin_memleak(char **argv) FAST_FUNC;
945#endif 954#endif
946#if ENABLE_HUSH_PRINTF 955#if ENABLE_HUSH_PRINTF
@@ -1037,7 +1046,7 @@ static const struct built_in_command bltins1[] = {
1037#if ENABLE_HUSH_LOCAL 1046#if ENABLE_HUSH_LOCAL
1038 BLTIN("local" , builtin_local , "Set local variables"), 1047 BLTIN("local" , builtin_local , "Set local variables"),
1039#endif 1048#endif
1040#if HUSH_DEBUG 1049#if ENABLE_HUSH_MEMLEAK
1041 BLTIN("memleak" , builtin_memleak , NULL), 1050 BLTIN("memleak" , builtin_memleak , NULL),
1042#endif 1051#endif
1043#if ENABLE_HUSH_READ 1052#if ENABLE_HUSH_READ
@@ -9534,7 +9543,7 @@ static int FAST_FUNC builtin_jobs(char **argv UNUSED_PARAM)
9534} 9543}
9535#endif 9544#endif
9536 9545
9537#if HUSH_DEBUG 9546#if ENABLE_HUSH_MEMLEAK
9538static int FAST_FUNC builtin_memleak(char **argv UNUSED_PARAM) 9547static int FAST_FUNC builtin_memleak(char **argv UNUSED_PARAM)
9539{ 9548{
9540 void *p; 9549 void *p;