[U-Boot] [RFC 2/2 v2] command: Remove maxargs from command structure
John Schmoller
jschmoller at xes-inc.com
Fri Mar 12 22:04:49 CET 2010
On Fri, 2010-03-12 at 14:58 -0600, Kim Phillips wrote:
> On Fri, 12 Mar 2010 13:25:31 -0600
> John Schmoller <jschmoller at 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
More information about the U-Boot
mailing list