diff options
author | Ye Li <ye.li@nxp.com> | 2019-07-16 01:39:40 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2019-07-17 00:14:12 -0700 |
commit | 5b12d7cabb14bab9a95af7460b36c6c85db1b328 (patch) | |
tree | cc0106359b91f80dca99f238d5ff7f73b8a479e5 /include | |
parent | 7a7702da2786e0678bbba41edd4d470dcea5fa35 (diff) |
MLK-22279-1 env: Add env_get_offset to override static env offset
Add env_get_offset interface to override static CONFIG_ENV_OFFSET,
and update env location driver to use env_get_offset. So for different
storage medium, we are able to store the env at different offset.
We don't support this feature when CONFIG_ENV_IS_EMBEDDED is set.
Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/environment.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/environment.h b/include/environment.h index 678f14250e8..03f7c990c48 100644 --- a/include/environment.h +++ b/include/environment.h @@ -282,6 +282,12 @@ int env_import_redund(const char *buf1, int buf1_status, const char *buf2, int buf2_status); #endif +#ifdef ENV_IS_EMBEDDED +#define env_get_offset(x) x +#else +long long env_get_offset(long long defautl_offset); +#endif + /** * env_get_char() - Get a character from the early environment * |