Sascha,
> -----Original Message-----
> From: Sascha Hauer [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 12, 2008 8:28 AM
> To: Menon, Nishanth
> Cc: [email protected]
> Subject: Re: [Patch] U-Boot-V2: parser.c sparse cleanup
> 
> > -#if (CONFIG_COMMANDS & CFG_CMD_BOOTD)
> > +#if defined(CONFIG_COMMANDS) & defined(CONFIG_CMD_BOOTD)
> 
> U-Boot v1 used to have a bitmask for enabled commands (CONFIG_COMMANDS)
> and each command was represented by one bit, hence the construct above.
> We don't have this anymore and I think that this recursion stop does not
> work as expected anymore anyway, so you can remove this completely.

Rev 2 of the patch:

Index: u-boot-v2.git/common/parser.c
===================================================================
--- u-boot-v2.git.orig/common/parser.c  2008-05-12 08:26:56.000000000 -0500
+++ u-boot-v2.git/common/parser.c       2008-05-12 08:28:05.000000000 -0500
@@ -2,7 +2,7 @@
 #include <command.h>
 #include <environment.h>
 
-int parse_line (char *line, char *argv[])
+static int parse_line (char *line, char *argv[])
 {
        int nargs = 0;
 
@@ -265,22 +265,6 @@
                        continue;
                }
 
-#if (CONFIG_COMMANDS & CFG_CMD_BOOTD)
-               /* avoid "bootd" recursion */
-               if (cmdtp->cmd == do_bootd) {
-#ifdef DEBUG_PARSER
-                       printf ("[%s]\n", finaltoken);
-#endif
-                       if (flag & CMD_FLAG_BOOTD) {
-                               puts ("'bootd' recursion detected\n");
-                               rc = -1;
-                               continue;
-                       } else {
-                               flag |= CMD_FLAG_BOOTD;
-                       }
-               }
-#endif /* CFG_CMD_BOOTD */
-
                /* OK - call function to do the command */
                if ((cmdtp->cmd) (cmdtp, argc, argv) != 0)
                        rc = -1;

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to