From: Mike Frysinger Date: Wed, 17 Nov 2010 05:56:47 -0500 Subject: [U-Boot] [PATCH 2/3] Add sendnbc tool to broadcast NBC magic packet In-Reply-To: <4b1b5107e01e45d21106a6dde83eb72669045f47.1289929762.git.blunderer@blunderer.org> References: <4b1b5107e01e45d21106a6dde83eb72669045f47.1289929762.git.blunderer@blunderer.org> Message-ID: <201011170556.47932.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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 : the ip addr to assign to u-boot board\n"); > + printf (" -m : the targeted board mac addr \n"); > + printf (" -n : the targeted board hostname \n"); > + printf > + (" -d : 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 -------------- 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/20101117/1e6cc770/attachment.pgp