From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 25 Jan 2012 19:12:51 +0100 Subject: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR In-Reply-To: <1327415291-13260-12-git-send-email-pali.rohar@gmail.com> References: <1327415291-13260-1-git-send-email-pali.rohar@gmail.com> <1327415291-13260-12-git-send-email-pali.rohar@gmail.com> Message-ID: <201201251912.51661.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > * if defined run env "premonitor" before Main Loop for Monitor Processing What is this good for? > > Signed-off-by: Pali Roh?r > --- > Changes since original version: > - removed #ifdef CONFIG_PREMONITOR in main.c > > common/env_common.c | 3 +++ > common/main.c | 4 ++++ > 2 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/common/env_common.c b/common/env_common.c > index 71811c4..1c2360d 100644 > --- a/common/env_common.c > +++ b/common/env_common.c > @@ -92,6 +92,9 @@ const uchar default_environment[] = { > #ifdef CONFIG_PREBOOT > "preboot=" CONFIG_PREBOOT "\0" > #endif > +#ifdef CONFIG_PREMONITOR > + "premonitor=" CONFIG_PREMONITOR "\0" > +#endif > #ifdef CONFIG_ROOTPATH > "rootpath=" CONFIG_ROOTPATH "\0" > #endif > diff --git a/common/main.c b/common/main.c > index 503d6c4..e0c262c 100644 > --- a/common/main.c > +++ b/common/main.c > @@ -427,6 +427,10 @@ void main_loop (void) > } > #endif > > + s = getenv("premonitor"); > + if (s) > + run_command2(s, 0); > + > /* > * Main Loop for Monitor Command Processing > */