diff options
author | Tom Rini <trini@konsulko.com> | 2019-07-18 11:31:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-07-18 11:31:37 -0400 |
commit | 0de815356474912ef5bef9a69f0327a5a93bb2c2 (patch) | |
tree | 92db8fda09396081f58a0c5fb182e72fbc3fdd50 /include/environment.h | |
parent | 9a06eb800c1bdc68aa81fcad6d4f404e12dfff33 (diff) | |
parent | bf88d2b023063a0c46d7617a4f6897d5d561662d (diff) |
Merge branch '2019-07-17-master-imports'
- Various FS/disk related fixes with security implications.
- Proper fix for the pci_ep test.
- Assorted bugfixes
- Some MediaTek updates.
- 'env erase' support.
Diffstat (limited to 'include/environment.h')
-rw-r--r-- | include/environment.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/environment.h b/include/environment.h index cd966761416..de67cf4f0ea 100644 --- a/include/environment.h +++ b/include/environment.h @@ -200,6 +200,7 @@ enum env_operation { ENVOP_INIT, /* we want to call the init function */ ENVOP_LOAD, /* we want to call the load function */ ENVOP_SAVE, /* we want to call the save function */ + ENVOP_ERASE, /* we want to call the erase function */ }; struct env_driver { @@ -226,6 +227,15 @@ struct env_driver { int (*save)(void); /** + * erase() - Erase the environment on storage + * + * This method is optional and required for 'eraseenv' to work. + * + * @return 0 if OK, -ve on error + */ + int (*erase)(void); + + /** * init() - Set up the initial pre-relocation environment * * This method is optional. @@ -304,6 +314,13 @@ int env_load(void); int env_save(void); /** + * env_erase() - Erase the environment on storage + * + * @return 0 if OK, -ve on error + */ +int env_erase(void); + +/** * env_fix_drivers() - Updates envdriver as per relocation */ void env_fix_drivers(void); |