[U-Boot] [PATCH v6 4/5] Put common autoload code into auto_load() function

Simon Glass sjg at chromium.org
Thu May 5 21:39:44 CEST 2011


On Thu, May 5, 2011 at 12:29 PM, Mike Frysinger <vapier at gentoo.org> wrote:

> On Thu, May 5, 2011 at 12:52, Simon Glass wrote:
> > +static void auto_load(void)
> > +{
> > +       char *s = getenv("autoload");
>
> const char *s
>
> > +       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)
> > +               } else if (strcmp(s, "NFS") == 0) {
> > +                       /*
> > +                        * Use NFS to load the bootfile.
> > +                        */
> > +                       NfsStart();
> > +                       return;
> > +#endif
> > +               }
> > +       }
> > +
> > +       TftpStart();
>
> put the TftpStart into a new else, then there's no need for the inline
> "return" ...
> -mike
>

Will do.


More information about the U-Boot mailing list