From: Wolfgang Denk Date: Tue, 18 Aug 2009 00:36:30 +0200 Subject: [U-Boot] [PATCH v2] arm: Kirkwood: add SYSRSTn Duration Counter Support In-Reply-To: <20090817221152.GM23695@game.jcrosoft.org> References: <1249662782-13333-1-git-send-email-prafulla@marvell.com> <20090817221152.GM23695@game.jcrosoft.org> Message-ID: <20090817223630.0F0C9833DBD2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Jean-Christophe PLAGNIOL-VILLARD, In message <20090817221152.GM23695@game.jcrosoft.org> you wrote: > > > + printf("Starting %s process...\n", __FUNCTION__); > > + sprintf(cmd, "run "); > > + sprintf(img, "sysrstcmd"); > > + argv[0] = cmd; > > + argv[1] = img; > > + if ((do_run(NULL, 0, 2, argv)) != 0x0) { > > + printf("Error.. %s failed\n", __FUNCTION__); > > + } else { > > + printf("%s process finished\n", __FUNCTION__); > > + } > > > +#else /* CONFIG_CMD_RUN */ > > + printf("Error.. %s needs run command support\n", __FUNCTION__); > > +#endif /* CONFIG_CMD_RUN */ > why not replace this by > > char *s = getenv("sysrstcmd"); > > if (!s) { > printf("Error.. %s failed, check sysrstcmd\n", > __FUNCTION__); > return; > } > > printf("Starting %s process...\n", __FUNCTION__); > #if !defined(CONFIG_SYS_HUSH_PARSER) > ret = run_command (s, 0); > #else > ret = parse_string_outer(s, FLAG_PARSE_SEMICOLON > | FLAG_EXIT_FROM_LOOP); > #endif Maybe because the original code does not need an #ifdef ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In the beginning there was nothing. And the Lord said "Let There Be Light!" And still there was nothing, but at least now you could see it.