From: Michael Walle Date: Wed, 11 Jan 2012 18:45:47 +0100 Subject: [U-Boot] [PATCH] cmd_source: introduce run_script() In-Reply-To: <201201101840.04925.vapier@gentoo.org> References: <1326236659-6257-1-git-send-email-michael@walle.cc> <201201101840.04925.vapier@gentoo.org> Message-ID: <8637dc62c148afc701492d6f5c2ef63a.squirrel@ssl.serverraum.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, January 11, 2012 00:40, Mike Frysinger wrote: > On Tuesday 10 January 2012 18:04:19 Michael Walle wrote: >> --- a/common/cmd_source.c >> +++ b/common/cmd_source.c >> >> +/* >> + * Run a series of commands, separated by '\n'. >> + * Beware, the contents of script may be modified while it is parsed. >> + */ >> +int run_script(char *script) > > const const? const char *script? script is modified while parsing, see comment above. I wanted to avoid copying. > also, we already have "run_command" and "run_command2", and they're both > in > common/main.c. how about naming this "source_commands" and also putting > it > into common/main.c ? i'm fine with that -- michael