X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fenv_flags.h;h=725841a891d7577dc9cd42414552fef69525a460;hb=6864fc8704661878294d1f0f981f47e864ef470f;hp=8823fb9602eaa78fdffc161004b003bfc65bff4d;hpb=13a3972585af60ec367d209cedbd3601e0c77467;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/env_flags.h b/include/env_flags.h index 8823fb9..725841a 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2012 * Joe Hershberger, National Instruments, joe.hershberger@ni.com - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __ENV_FLAGS_H__ @@ -37,9 +36,9 @@ enum env_flags_varaccess { #define CONFIG_ENV_FLAGS_LIST_STATIC "" #endif -#ifdef CONFIG_CMD_NET +#ifdef CONFIG_NET #ifdef CONFIG_REGEX -#define ETHADDR_WILDCARD "\\d?" +#define ETHADDR_WILDCARD "\\d*" #else #define ETHADDR_WILDCARD #endif @@ -57,8 +56,8 @@ enum env_flags_varaccess { "gatewayip:i," \ "netmask:i," \ "serverip:i," \ - "nvlan:i," \ - "vlan:i," \ + "nvlan:d," \ + "vlan:d," \ "dnsip:i," #else #define ETHADDR_FLAGS @@ -143,23 +142,24 @@ int env_flags_validate_varaccess(const char *name, int check_mask); /* * Validate the parameters passed to "env set" for type compliance */ -int env_flags_validate_env_set_params(int argc, char * const argv[]); +int env_flags_validate_env_set_params(char *name, char *const val[], int count); #else /* !USE_HOSTCC */ +#include #include /* * When adding a variable to the environment, initialize the flags for that * variable. */ -void env_flags_init(ENTRY *var_entry); +void env_flags_init(struct env_entry *var_entry); /* * Validate the newval for to conform with the requirements defined by its flags */ -int env_flags_validate(const ENTRY *item, const char *newval, enum env_op op, - int flag); +int env_flags_validate(const struct env_entry *item, const char *newval, + enum env_op op, int flag); #endif /* USE_HOSTCC */