diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2019-05-14 19:35:02 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-18 12:32:02 -0400 |
commit | 7d57485a8a3c45c254919f01337c14cc2856accd (patch) | |
tree | d153de42617f0bcfc783da793caa39487e26b39e /tools/fit_common.h | |
parent | 26992928e80a7f8d86267985b211a858094dc389 (diff) |
tools: use read-only mmap in fit_check_sign
Add an option to open files in read-only mode in mmap_fdt so
that fit_check_sign can be used to inspect files on read-only
filesystems.
For example, this is useful when a key is shipped in a read-only
rootfs or squashfs.
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Diffstat (limited to 'tools/fit_common.h')
-rw-r--r-- | tools/fit_common.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/fit_common.h b/tools/fit_common.h index 9e09624f64..1e81d4c68b 100644 --- a/tools/fit_common.h +++ b/tools/fit_common.h @@ -32,9 +32,11 @@ int fit_check_image_types(uint8_t type); * @blobp: Returns pointer to FDT blob * @sbuf: File status information is stored here * @delete_on_error: true to delete the file if we get an error + * @read_only: true to open in read-only mode * @return 0 if OK, -1 on error. */ int mmap_fdt(const char *cmdname, const char *fname, size_t size_inc, - void **blobp, struct stat *sbuf, bool delete_on_error); + void **blobp, struct stat *sbuf, bool delete_on_error, + bool read_only); #endif /* _FIT_COMMON_H_ */ |