hush: make memleak builtin optional
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
6ec76d8719
commit
4471969db2
17
shell/hush.c
17
shell/hush.c
@ -286,6 +286,13 @@
|
|||||||
//config: help
|
//config: help
|
||||||
//config: Enable umask builtin in hush.
|
//config: Enable umask builtin in hush.
|
||||||
//config:
|
//config:
|
||||||
|
//config:config HUSH_MEMLEAK
|
||||||
|
//config: bool "memleak builtin (debugging)"
|
||||||
|
//config: default n
|
||||||
|
//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
|
||||||
|
//config: help
|
||||||
|
//config: Enable umask builtin in hush.
|
||||||
|
//config:
|
||||||
//config:config MSH
|
//config:config MSH
|
||||||
//config: bool "msh (deprecated: aliased to hush)"
|
//config: bool "msh (deprecated: aliased to hush)"
|
||||||
//config: default n
|
//config: default n
|
||||||
@ -897,8 +904,10 @@ struct globals {
|
|||||||
# define G_traps ((char**)NULL)
|
# define G_traps ((char**)NULL)
|
||||||
#endif
|
#endif
|
||||||
sigset_t pending_set;
|
sigset_t pending_set;
|
||||||
#if HUSH_DEBUG
|
#if ENABLE_HUSH_MEMLEAK
|
||||||
unsigned long memleak_value;
|
unsigned long memleak_value;
|
||||||
|
#endif
|
||||||
|
#if HUSH_DEBUG
|
||||||
int debug_indent;
|
int debug_indent;
|
||||||
#endif
|
#endif
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
@ -940,7 +949,7 @@ static int builtin_history(char **argv) FAST_FUNC;
|
|||||||
#if ENABLE_HUSH_LOCAL
|
#if ENABLE_HUSH_LOCAL
|
||||||
static int builtin_local(char **argv) FAST_FUNC;
|
static int builtin_local(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if HUSH_DEBUG
|
#if ENABLE_HUSH_MEMLEAK
|
||||||
static int builtin_memleak(char **argv) FAST_FUNC;
|
static int builtin_memleak(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_HUSH_PRINTF
|
#if ENABLE_HUSH_PRINTF
|
||||||
@ -1037,7 +1046,7 @@ static const struct built_in_command bltins1[] = {
|
|||||||
#if ENABLE_HUSH_LOCAL
|
#if ENABLE_HUSH_LOCAL
|
||||||
BLTIN("local" , builtin_local , "Set local variables"),
|
BLTIN("local" , builtin_local , "Set local variables"),
|
||||||
#endif
|
#endif
|
||||||
#if HUSH_DEBUG
|
#if ENABLE_HUSH_MEMLEAK
|
||||||
BLTIN("memleak" , builtin_memleak , NULL),
|
BLTIN("memleak" , builtin_memleak , NULL),
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_HUSH_READ
|
#if ENABLE_HUSH_READ
|
||||||
@ -9534,7 +9543,7 @@ static int FAST_FUNC builtin_jobs(char **argv UNUSED_PARAM)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HUSH_DEBUG
|
#if ENABLE_HUSH_MEMLEAK
|
||||||
static int FAST_FUNC builtin_memleak(char **argv UNUSED_PARAM)
|
static int FAST_FUNC builtin_memleak(char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
void *p;
|
void *p;
|
||||||
|
Loading…
Reference in New Issue
Block a user