]> Git Repo - J-u-boot.git/blobdiff - env/flags.c
Merge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"
[J-u-boot.git] / env / flags.c
index df4aed26b2c6315d0e1a54eb4171bfc0b0d6149f..233fd460d84215224e1934e5c34085a4b50a58d8 100644 (file)
@@ -8,9 +8,9 @@
 #include <linux/string.h>
 #include <linux/ctype.h>
 
+#include <stdio.h>
 #ifdef USE_HOSTCC /* Eliminate "ANSI does not permit..." warnings */
 #include <stdint.h>
-#include <stdio.h>
 #include "fw_env_private.h"
 #include "fw_env.h"
 #include <env_attr.h>
 #define env_get fw_getenv
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 #else
-#include <common.h>
+#include <linux/kernel.h>
 #include <env_internal.h>
 #endif
 
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 #define ENV_FLAGS_NET_VARTYPE_REPS "im"
 #else
 #define ENV_FLAGS_NET_VARTYPE_REPS ""
@@ -57,7 +57,7 @@ static const char * const env_flags_vartype_names[] = {
        "decimal",
        "hexadecimal",
        "boolean",
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
        "IP address",
        "MAC address",
 #endif
@@ -211,7 +211,7 @@ static void skip_num(int hex, const char *value, const char **end,
                *end = value;
 }
 
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 int eth_validate_ethaddr_str(const char *addr)
 {
        const char *end;
@@ -244,7 +244,7 @@ static int _env_flags_validate_type(const char *value,
        enum env_flags_vartype type)
 {
        const char *end;
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
        const char *cur;
        int i;
 #endif
@@ -273,7 +273,7 @@ static int _env_flags_validate_type(const char *value,
                if (value[1] != '\0')
                        return -1;
                break;
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
        case env_flags_vartype_ipaddr:
                cur = value;
                for (i = 0; i < 4; i++) {
@@ -563,12 +563,13 @@ int env_flags_validate(const struct env_entry *item, const char *newval,
                return 1;
 #endif
 
-#ifndef CONFIG_ENV_ACCESS_IGNORE_FORCE
        if (flag & H_FORCE) {
+#ifdef CONFIG_ENV_ACCESS_IGNORE_FORCE
                printf("## Error: Can't force access to \"%s\"\n", name);
+#else
                return 0;
-       }
 #endif
+       }
        switch (op) {
        case env_op_delete:
                if (item->flags & ENV_FLAGS_VARACCESS_PREVENT_DELETE) {
This page took 0.027288 seconds and 4 git commands to generate.