[U-Boot] [PATCH 3/3] hush: Include file and line number when reporting syntax errors

Mike Frysinger vapier at gentoo.org
Sat Aug 18 01:33:36 CEST 2012


On Friday 17 August 2012 16:26:31 Joe Hershberger wrote:
> Make debugging script problems easier just like non-u-boot.

err, but you're posting "hush.c" all the time, and the line number of the 
source code in hush.c, not the line of the shell script

> --- a/common/hush.c
> +++ b/common/hush.c
> 
>  #ifdef __U_BOOT__
> -static void syntax_err(void) {
> -	 printf("syntax error\n");
> +static void __syntax_err(char *file, int line)

const char *file

> +{
> +	 printf("syntax error %s:%d\n", file, line);
>  }
> +#define syntax_err() __syntax_err(__FILE__, __LINE__)

shouldn't this be behind a DEBUG define ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120817/eb3fd5ac/attachment.pgp>


More information about the U-Boot mailing list