sim/cmdline: save boot cmdline to g_argc g_argv

Change-Id: I989850a09528e3868957284c9f419d0992ae8d1f
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-07-16 18:17:10 +08:00 committed by Xiang Xiao
parent 5e01fe050a
commit e98220c81a
2 changed files with 15 additions and 0 deletions

View File

@ -37,6 +37,13 @@
#include "up_internal.h"
/****************************************************************************
* Public Data
****************************************************************************/
int g_argc;
char **g_argv;
/****************************************************************************
* Private Data
****************************************************************************/
@ -62,6 +69,9 @@ static char g_logbuffer[4096];
int main(int argc, char **argv, char **envp)
{
g_argc = argc;
g_argv = argv;
#ifdef CONFIG_SYSLOG_RPMSG
syslog_rpmsg_init_early(g_logbuffer, sizeof(g_logbuffer));
#endif

View File

@ -123,6 +123,11 @@ extern volatile void *g_current_regs[1];
#endif
/* The command line arguments passed to simulator */
extern int g_argc;
extern char **g_argv;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/