From: Jason Hobbs Date: Tue, 26 Jul 2011 13:51:03 -0500 Subject: [U-Boot] [PATCH v3 5/7] common: add run_command2 for running simple or hush commands In-Reply-To: <20110725204218.6C02C138EED4@gemini.denx.de> References: <1309364719-16219-1-git-send-email-jason.hobbs@calxeda.com> <1309364719-16219-6-git-send-email-jason.hobbs@calxeda.com> <20110725204218.6C02C138EED4@gemini.denx.de> Message-ID: <20110726185103.GA22660@jhobbs-laptop> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jul 25, 2011 at 10:42:18PM +0200, Wolfgang Denk wrote: > Dear "Jason Hobbs", > > -# ifndef CONFIG_SYS_HUSH_PARSER - run_command (p, 0); -# > > else - parse_string_outer(p, FLAG_PARSE_SEMICOLON | - > > FLAG_EXIT_FROM_LOOP); -# endif + run_command2(p, 0); > > Indentation seems wrong here - it should be one TAB more to the right? Grr, yes. I will change and resubmit. > > > +int run_command2(const char *cmd, int flag) > > +{ > > +#ifndef CONFIG_SYS_HUSH_PARSER > > + if (run_command(cmd, flag) == -1) > > + return 1; > > +#else > > + if (parse_string_outer(cmd, > > + FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0) > > + return 1; > > +#endif > > + return 0; > > +} > > Can we make this inline [in the normal (non-menu) case], please? Yes, I will change and resubmit. Thanks, Jason