From 155cb0104a9dc2924e209c8d0279f1da295b4d01 Mon Sep 17 00:00:00 2001 From: stroese Date: Fri, 11 Jul 2003 08:00:33 +0000 Subject: [PATCH] - Fix bug in CONFIG_VERSION_VARIABLE. --- common/cmd_nvedit.c | 3 --- common/main.c | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index bfc69bdb48..53df582cfa 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -183,9 +183,6 @@ int _do_setenv (int flag, int argc, char *argv[]) * ver is readonly. */ if ( (strcmp (name, "serial#") == 0) || -#if defined(CONFIG_VERSION_VARIABLE) - (strcmp (name, "ver") == 0) || -#endif /* CONFIG_VERSION_VARIABLE */ ((strcmp (name, "ethaddr") == 0) #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR) && (strcmp (env_get_addr(oldval),MK_STR(CONFIG_ETHADDR)) != 0) diff --git a/common/main.c b/common/main.c index f7830a1f3d..5ddecca736 100644 --- a/common/main.c +++ b/common/main.c @@ -284,10 +284,8 @@ void main_loop (void) #ifdef CONFIG_VERSION_VARIABLE { extern char version_string[]; - char *str = getenv("ver"); - if (!str) - setenv ("ver", version_string); /* set version variable */ + setenv ("ver", version_string); /* set version variable */ } #endif /* CONFIG_VERSION_VARIABLE */ -- 2.39.5