From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] Create a single cmd_call() function to handle command execution
Date: Tue, 25 Oct 2011 19:03:24 +1100 [thread overview]
Message-ID: <4EA66D4C.8010506@gmail.com> (raw)
In-Reply-To: <20111025074638.1C7081408EA7@gemini.denx.de>
Hi Wolfgang,
On 25/10/11 18:46, Wolfgang Denk wrote:
> Dear Simon Glass,
>
> In message <1319514744-18697-1-git-send-email-sjg@chromium.org> you wrote:
>> We should aim for a single point of entry to the commands, whichever
>> parser is used.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>> common/command.c | 10 ++++++++++
>> common/hush.c | 9 +++------
>> common/main.c | 3 +--
>> include/command.h | 12 ++++++++++++
>> 4 files changed, 26 insertions(+), 8 deletions(-)
>>
>> diff --git a/common/command.c b/common/command.c
>> index c5cecd3..acc1c15 100644
>> --- a/common/command.c
>> +++ b/common/command.c
>> @@ -487,3 +487,13 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
>> }
>> }
>> #endif
>> +
>> +int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>> +{
>> + int result;
>> +
>> + result = (cmdtp->cmd)(cmdtp, flag, argc, argv);
>> + if (result)
>> + debug("Command failed, result=%d", result);
>> + return result;
>> +}
>
> What exactly is the purpose of this additional function? Except for
> the debug() it provides only overhead and no benefit.
It provides a single location to issue an XOFF immediately prior to running
a (potentially long running) command
> I don't think I want to have that.
Well it does make things cleaner if we do end up implementing software flow
control
Regards,
Graeme
next prev parent reply other threads:[~2011-10-25 8:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 3:52 [U-Boot] [PATCH 1/2] Create a single cmd_call() function to handle command execution Simon Glass
2011-10-25 3:52 ` [U-Boot] [PATCH 2/2] RFC: Add XON/XOFF support Simon Glass
2011-10-25 8:09 ` Graeme Russ
2011-10-25 23:56 ` Simon Glass
2011-10-30 21:30 ` Mike Frysinger
2011-10-30 23:53 ` Albert ARIBAUD
2011-10-25 7:46 ` [U-Boot] [PATCH 1/2] Create a single cmd_call() function to handle command execution Wolfgang Denk
2011-10-25 8:03 ` Graeme Russ [this message]
2011-10-25 13:33 ` Simon Glass
2011-10-25 18:20 ` Wolfgang Denk
2011-10-25 13:57 ` Mike Frysinger
2011-10-25 23:05 ` Simon Glass
2011-10-30 21:28 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EA66D4C.8010506@gmail.com \
--to=graeme.russ@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.