diff --git a/system/system/Kconfig b/system/system/Kconfig index 60af65449..955a4c6ea 100644 --- a/system/system/Kconfig +++ b/system/system/Kconfig @@ -41,4 +41,10 @@ config SYSTEM_SYSTEM_PRIORITY ---help--- The priority of the shell. +config SYSTEM_SYSTEM_DUMPINFO + bool "dump the system information" + default n + ---help--- + Dump the system information when the system() command is executed. + endif diff --git a/system/system/system.c b/system/system/system.c index 5ecc3ae8b..096f99718 100644 --- a/system/system/system.c +++ b/system/system/system.c @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include "nshlib/nshlib.h" @@ -68,6 +70,11 @@ int system(FAR const char *cmd) int rc; int ret; +#ifdef CONFIG_SYSTEM_SYSTEM_DUMPINFO + syslog(LOG_INFO, "SYSTEM cmd=%s\n", cmd); + dump_stack(); +#endif + /* REVISIT: If cmd is NULL, then system() should return a non-zero value to * indicate if the command processor is available or zero if it is not. */