mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
env: Use getenv_yesno() more generally
Move the getenv_yesno() to env_common.c and change most checks for 'y' or 'n' to use this helper. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
7afcf3a55b
commit
ec8a252cd4
16 changed files with 56 additions and 79 deletions
|
@ -340,6 +340,11 @@ int envmatch (uchar *, int);
|
|||
char *getenv (const char *);
|
||||
int getenv_f (const char *name, char *buf, unsigned len);
|
||||
ulong getenv_ulong(const char *name, int base, ulong default_val);
|
||||
/*
|
||||
* Read an environment variable as a boolean
|
||||
* Return -1 if variable does not exist (default to true)
|
||||
*/
|
||||
int getenv_yesno(const char *var);
|
||||
int saveenv (void);
|
||||
int setenv (const char *, const char *);
|
||||
int setenv_ulong(const char *varname, ulong value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue