From: John Schmoller <jschmoller@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC 2/2 v2] command: Remove maxargs from command structure
Date: Fri, 12 Mar 2010 15:04:49 -0600 [thread overview]
Message-ID: <1268427889.11854.12.camel@johns> (raw)
In-Reply-To: <20100312145812.a8b4bb7a.kim.phillips@freescale.com>
On Fri, 2010-03-12 at 14:58 -0600, Kim Phillips wrote:
> On Fri, 12 Mar 2010 13:25:31 -0600
> John Schmoller <jschmoller@xes-inc.com> wrote:
>
> > +/*
> > + * Command Errors:
> > + */
> > +#define CMD_ERR_USAGE 256
> > +
>
> can we just use something like -EINVAL instead of reinventing the error
> codes wheel?
The problem with a negative return value, at least as far as I can tell,
is that hush will print "exit not allowed from main input shell."
run_list_real() returns -2 if the called functions return is < -1, and
-2 means exit. If I'm misinterpreting something, let me know. I don't
see any problem with using positive EINVAL, though, I didn't notice it
existed.
John
next prev parent reply other threads:[~2010-03-12 21:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 19:25 [U-Boot] [RFC 0/2 v2] Remove CONFIG_SYS_MAXARGS John Schmoller
2010-03-12 19:25 ` [U-Boot] [RFC 1/2 v2] cmd: " John Schmoller
2010-03-12 19:25 ` [U-Boot] [RFC 2/2 v2] command: Remove maxargs from command structure John Schmoller
2010-03-12 20:58 ` Kim Phillips
2010-03-12 21:04 ` John Schmoller [this message]
2010-03-12 21:32 ` Kim Phillips
2010-04-09 21:04 ` [U-Boot] [RFC 0/2 v2] Remove CONFIG_SYS_MAXARGS Wolfgang Denk
2010-04-09 22:00 ` John Schmoller
2010-04-09 22:35 ` Wolfgang Denk
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=1268427889.11854.12.camel@johns \
--to=jschmoller@xes-inc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox