From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Schmoller Date: Fri, 12 Mar 2010 15:04:49 -0600 Subject: [U-Boot] [RFC 2/2 v2] command: Remove maxargs from command structure In-Reply-To: <20100312145812.a8b4bb7a.kim.phillips@freescale.com> References: <20100312145812.a8b4bb7a.kim.phillips@freescale.com> Message-ID: <1268427889.11854.12.camel@johns> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, 2010-03-12 at 14:58 -0600, Kim Phillips wrote: > On Fri, 12 Mar 2010 13:25:31 -0600 > John Schmoller 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