diff options
author | Andreas Fenkart <andreas.fenkart@digitalstrom.com> | 2016-04-05 23:13:42 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-05-27 15:39:56 -0400 |
commit | 81974f4479d19c441c4a089aedd238c251626b3e (patch) | |
tree | 53739697c1736e8c1da72edd57246f4ecd8effd2 /tools/env/fw_env.h | |
parent | 367d789d87cd562cfe4f28c865dd6d342f595baf (diff) | |
download | u-boot-imx-81974f4479d19c441c4a089aedd238c251626b3e.zip u-boot-imx-81974f4479d19c441c4a089aedd238c251626b3e.tar.gz u-boot-imx-81974f4479d19c441c4a089aedd238c251626b3e.tar.bz2 |
tools/env: no global variable sharing between application and library
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
Diffstat (limited to 'tools/env/fw_env.h')
-rw-r--r-- | tools/env/fw_env.h | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index d4daeea..dac964d 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -57,33 +57,22 @@ "bootm" #endif -struct common_args { +struct env_opts { #ifdef CONFIG_FILE char *config_file; #endif - uint8_t aes_key[AES_KEY_LENGTH]; int aes_flag; /* Is AES encryption used? */ + uint8_t aes_key[AES_KEY_LENGTH]; }; -extern struct common_args common_args; - -struct printenv_args { - int value_only; -}; -extern struct printenv_args printenv_args; - -struct setenv_args { - char *script_file; -}; -extern struct setenv_args setenv_args; int parse_aes_key(char *key, uint8_t *bin_key); -int fw_printenv(int argc, char *argv[], int value_only); +int fw_printenv(int argc, char *argv[], int value_only, struct env_opts *opts); char *fw_getenv(char *name); -int fw_setenv(int argc, char *argv[]); -int fw_parse_script(char *fname); -int fw_env_open(void); +int fw_setenv(int argc, char *argv[], struct env_opts *opts); +int fw_parse_script(char *fname, struct env_opts *opts); +int fw_env_open(struct env_opts *opts); int fw_env_write(char *name, char *value); -int fw_env_close(void); +int fw_env_close(struct env_opts *opts); unsigned long crc32(unsigned long, const unsigned char *, unsigned); |