[U-Boot] [PATCH 2/3] Add sendnbc tool to broadcast NBC magic packet

tristan blunderer at gmail.com
Wed Nov 17 14:33:50 CET 2010


Hi Mike,

Thank you for all your correction hints.
I used the Lindent script to check for mistakes, but obviously, this was not
enought, and I will correct all these with care.

Regards

2010/11/17 Mike Frysinger <vapier at gentoo.org>

> On Tuesday, November 16, 2010 13:04:32 tristan.lelong at blunderer.org wrote:
> > --- /dev/null
> > +++ b/tools/sendnbc.c
> > @@ -0,0 +1,219 @@
> > +#include <stdio.h>
>
> missing licensing & copyright header
>
> > +static void usage (char *argv0)
>
> style problems throughout this file too
>
> > +     printf
> > +         ("SENDNBC: sends a magic packet to u-boot board to interrupt
> the
> > autoboot\n"); +       printf ("         and reconfigure u-boot in
> netconsole
> > mode.\n"); +  printf
> > +         ("         Use in combination with netconsole to connect and
> > control\n"); +        printf ("        your u-boot device\n");
> > +     printf
> > +         ("   Ex: BOARD_IP=192.168.0.2 ./sendnbc -i $BOARD_IP -d eth0 &&
> > ./netconsole $BOARD_IP\n"); + printf ("\nusage: %s [options]\n", argv0);
> > +     printf (" -i <ip addr>: the ip addr to assign to u-boot board\n");
> > +     printf (" -m <mac addr>: the targeted board mac addr \n");
> > +     printf (" -n <hostname>: the targeted board hostname \n");
> > +     printf
> > +         (" -d <device>: the net interface to use for broadcasting (ex:
> eth0).
> > Must be root to use this option\n"); +        printf (" -h: display this
> > help\n");
>
> multiple calls to printf() is such a waste.  combine all the strings into
> one
> and call printf() just once.
> -mike
>



-- 
618FE3EF


More information about the U-Boot mailing list