public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 RESEND 4/5] Put common autoload code into auto_load() function
Date: Fri, 10 Jun 2011 23:53:41 +0200	[thread overview]
Message-ID: <4DF29265.10305@eukrea.com> (raw)
In-Reply-To: <1307718251-15947-5-git-send-email-sjg@chromium.org>

Hi Simon,

On 10/06/2011 17:04, Simon Glass wrote:
> This is a small clean-up patch.
>
> Signed-off-by: Simon Glass<sjg@chromium.org>
> ---
>   net/bootp.c |   75 +++++++++++++++++++++++++---------------------------------
>   1 files changed, 32 insertions(+), 43 deletions(-)
>
> diff --git a/net/bootp.c b/net/bootp.c
> index 4db63cb..4774624 100644
> --- a/net/bootp.c
> +++ b/net/bootp.c
> @@ -138,6 +138,35 @@ static int truncate_sz (const char *name, int maxlen, int curlen)
>   	return (curlen);
>   }
>
> +/*
> + * Check if autoload is enabled. If so, use either NFS or TFTP to download
> + * the boot file.
> + */
> +static void auto_load(void)
> +{
> +	const char *s = getenv("autoload");
> +
> +	if (s != NULL) {
> +		if (*s == 'n') {
> +			/*
> +			 * Just use BOOTP to configure system;
> +			 * Do not use TFTP to load the bootfile.
> +			 */
> +			NetState = NETLOOP_SUCCESS;
> +			return;
> +		}
> +#if defined(CONFIG_CMD_NFS)
> +		if (strcmp(s, "NFS") == 0) {
> +			/*
> +			 * Use NFS to load the bootfile.
> +			 */
> +			NfsStart();
> +			return;
> +		}
> +#endif
> +	TftpStart();
> +}

a "}" is missing here

Eric

  reply	other threads:[~2011-06-10 21:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 15:04 [U-Boot] [PATCH v7 RESEND 0/5] Add SMSC95XX support including MAC address control Simon Glass
2011-06-10 15:04 ` [U-Boot] [PATCH v7 RESEND 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter Simon Glass
2011-06-10 22:09   ` Eric Bénard
2011-06-10 22:26     ` Simon Glass
2011-06-10 22:54       ` Eric Bénard
2011-06-10 15:04 ` [U-Boot] [PATCH v7 RESEND 2/5] Add Ethernet hardware MAC address framework to usbnet Simon Glass
2011-06-10 15:04 ` [U-Boot] [PATCH v7 RESEND 3/5] Add documentation for USB Host Networking Simon Glass
2011-06-10 15:04 ` [U-Boot] [PATCH v7 RESEND 4/5] Put common autoload code into auto_load() function Simon Glass
2011-06-10 21:53   ` Eric Bénard [this message]
2011-06-10 22:32     ` Simon Glass
2011-06-10 15:04 ` [U-Boot] [PATCH v7 RESEND 5/5] usbeth: asix: Do a fast init if link already established Simon Glass
2011-06-10 20:09   ` Mike Frysinger
2011-06-10 22:22     ` Simon Glass
2011-06-11 22:17       ` Mike Frysinger
2011-06-12  0:01         ` Simon Glass
2011-06-10 22:25 ` [U-Boot] [PATCH v7 RESEND 0/5] Add SMSC95XX support including MAC address control Eric Bénard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DF29265.10305@eukrea.com \
    --to=eric@eukrea.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox