diff mbox

[U-Boot,v3,09/10] a3m071: Make spl_start_uboot test like getenv_yesno does

Message ID 1396022622-3527-9-git-send-email-trini@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini March 28, 2014, 4:03 p.m. UTC
This change makes the behaviour slightly more rebust and will match
other implementations which can use getenv_yesno directly.

Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
---
 board/a3m071/a3m071.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tom Rini April 18, 2014, 1:22 p.m. UTC | #1
On Fri, Mar 28, 2014 at 12:03:41PM -0400, Tom Rini wrote:

> This change makes the behaviour slightly more rebust and will match
> other implementations which can use getenv_yesno directly.
> 
> Acked-by: Stefan Roese <sr@denx.de>
> Signed-off-by: Tom Rini <trini@ti.com>

Applied to u-boot-ti/master, thanks!
diff mbox

Patch

diff --git a/board/a3m071/a3m071.c b/board/a3m071/a3m071.c
index 7aeefb2..b96ba81 100644
--- a/board/a3m071/a3m071.c
+++ b/board/a3m071/a3m071.c
@@ -412,7 +412,8 @@  int spl_start_uboot(void)
 
 	env_init();
 	getenv_f("boot_os", s, sizeof(s));
-	if ((s != NULL) && (strcmp(s, "yes") == 0))
+	if ((s != NULL) && (*s == '1' || *s == 'y' || *s == 'Y' ||
+			    *s == 't' || *s == 'T'))
 		return 0;
 
 	return 1;