]> git.sur5r.net Git - u-boot/blobdiff - common/env_flags.c
video: ipu reg: Correct reserved array size in struct ipu_idmac
[u-boot] / common / env_flags.c
index 4caf12e697035f3c912cb309065f6376fc264920..e9b72e60a94cb57091fed15d6aeeada78f16abd2 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2012
  * Joe Hershberger, National Instruments, joe.hershberger@ni.com
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <linux/string.h>
@@ -503,25 +487,6 @@ int env_flags_validate(const ENTRY *item, const char *newval, enum env_op op,
        /* Default value for NULL to protect string-manipulating functions */
        newval = newval ? : "";
 
-#ifndef CONFIG_ENV_OVERWRITE
-       /*
-        * Some variables like "ethaddr" and "serial#" can be set only once and
-        * cannot be deleted, unless CONFIG_ENV_OVERWRITE is defined.
-        */
-       if (op != env_op_create &&              /* variable exists */
-               (flag & H_FORCE) == 0) {        /* and we are not forced */
-               if (strcmp(name, "serial#") == 0 ||
-                   (strcmp(name, "ethaddr") == 0
-#if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
-                    && strcmp(oldval, __stringify(CONFIG_ETHADDR)) != 0
-#endif /* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */
-                       )) {
-                       printf("Can't overwrite \"%s\"\n", name);
-                       return 1;
-               }
-       }
-#endif
-
        /* validate the value to match the variable type */
        if (op != env_op_delete) {
                enum env_flags_vartype type = (enum env_flags_vartype)