]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/cmd_nvedit.c
net: introduce per device index
[karo-tx-uboot.git] / common / cmd_nvedit.c
index 7409a3644af1d1c0d8a48b19f69c6077f5853f4f..baaa513f6b2856ddc5d41d8735b9afc429b4d79c 100644 (file)
@@ -179,7 +179,7 @@ static int do_env_grep(cmd_tbl_t *cmdtp, int flag,
 
        while (arg <= argc) {
                idx = 0;
-               while (idx = hstrstr_r(argv[arg], idx, &match, &env_htab)) {
+               while ((idx = hstrstr_r(argv[arg], idx, &match, &env_htab))) {
                        if (!(matched[idx / 8] & (1 << (idx & 7)))) {
                                puts(match->key);
                                puts("=");
@@ -977,7 +977,9 @@ U_BOOT_CMD(
 #if defined(CONFIG_CMD_RUN)
        "env run var [...] - run commands in an environment variable\n"
 #endif
+#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
        "env save - save environment\n"
+#endif
        "env set [-f] name [arg ...]\n"
 );