diff options
Diffstat (limited to 'include/environment.h')
-rw-r--r-- | include/environment.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/environment.h b/include/environment.h index 39606b8ad9..8b143c16b7 100644 --- a/include/environment.h +++ b/include/environment.h @@ -2,9 +2,6 @@ /* * (C) Copyright 2002 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. */ #ifndef _ENVIRONMENT_H_ @@ -35,8 +32,10 @@ char *var_name(struct variable_d *); #ifdef CONFIG_ENVIRONMENT_VARIABLES const char *getenv(const char *); int setenv(const char *, const char *); +int pr_setenv(const char *, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3))); void export_env_ull(const char *name, unsigned long long val); int getenv_ull(const char *name, unsigned long long *val); +int getenv_ullx(const char *name, unsigned long long *val); int getenv_ul(const char *name, unsigned long *val); int getenv_uint(const char *name, unsigned int *val); int getenv_bool(const char *var, int *val); @@ -52,6 +51,12 @@ static inline int setenv(const char *var, const char *val) return 0; } +static inline __attribute__ ((format(__printf__, 2, 3))) int pr_setenv( + const char *var, const char *fmt, ...) +{ + return 0; +} + static inline void export_env_ull(const char *name, unsigned long long val) {} static inline int getenv_ull(const char *name, unsigned long long *val) @@ -59,6 +64,11 @@ static inline int getenv_ull(const char *name, unsigned long long *val) return -EINVAL; } +static inline int getenv_ullx(const char *name, unsigned long long *val) +{ + return -EINVAL; +} + static inline int getenv_ul(const char *name, unsigned long *val) { return -EINVAL; @@ -90,6 +100,11 @@ int env_push_context(void); int export(const char *); +static inline int unsetenv(const char *var) +{ + return setenv(var, NULL); +} + #endif /* _ENVIRONMENT_H_ */ /** |