From f2c87a3d2f6df0886124636239d9950ef0abcab0 Mon Sep 17 00:00:00 2001 From: Michael Tritz Date: Wed, 12 Jul 2017 15:31:49 -0500 Subject: pflash option to retrieve PNOR partition flags This commit extends pflash with an option to retrieve and print information for a particular partition, including the content from "pflash -i" and a verbose list of set miscellaneous flags. -i option is also updated to print a short list of flags in addition to the ECC flag, with one character per flag. A test of the new option is included in libflash/test. Signed-off-by: Michael Tritz Reviewed-by: Cyril Bur [stewart@linux.vnet.ibm.com: various test fixes, enable gcov] Signed-off-by: Stewart Smith --- libflash/libffs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libflash/libffs.h') diff --git a/libflash/libffs.h b/libflash/libffs.h index 2c1fbd8..a86c698 100644 --- a/libflash/libffs.h +++ b/libflash/libffs.h @@ -92,6 +92,8 @@ struct ffs_entry_user { bool has_ecc(struct ffs_entry *ent); +bool has_flag(struct ffs_entry *ent, uint16_t flag); + /* Init */ int ffs_init(uint32_t offset, uint32_t max_size, struct blocklevel_device *bl, @@ -126,6 +128,8 @@ int ffs_part_info(struct ffs_handle *ffs, uint32_t part_idx, char **name, uint32_t *start, uint32_t *total_size, uint32_t *act_size, bool *ecc); +struct ffs_entry *ffs_entry_get(struct ffs_handle *ffs, uint32_t index); + int ffs_update_act_size(struct ffs_handle *ffs, uint32_t part_idx, uint32_t act_size); -- cgit v1.1