diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2017-10-11 15:23:44 -0500 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-11-09 22:11:44 -0600 |
commit | b786e7ba1d34c5a4d8baa6304f4d930539cefac8 (patch) | |
tree | 97f072c5a41a7ffc9a3166f6c139a839c2cf7c21 /libflash | |
parent | 370b8866871b5c2cf3286afbf19fc90282cb3508 (diff) | |
download | skiboot-b786e7ba1d34c5a4d8baa6304f4d930539cefac8.zip skiboot-b786e7ba1d34c5a4d8baa6304f4d930539cefac8.tar.gz skiboot-b786e7ba1d34c5a4d8baa6304f4d930539cefac8.tar.bz2 |
pflash: Support for volatile flag
The volatile flag was added to the pnor image to
indicate partitions that are cleared during a host
power off. Display this flag from the pflash command.
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r-- | libflash/ffs.h | 1 | ||||
-rw-r--r-- | libflash/libffs.c | 4 | ||||
-rw-r--r-- | libflash/libffs.h | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/libflash/ffs.h b/libflash/ffs.h index 1872253..26cb9d8 100644 --- a/libflash/ffs.h +++ b/libflash/ffs.h @@ -76,6 +76,7 @@ enum ffs_type { #define FFS_MISCFLAGS_READONLY 0x40 #define FFS_MISCFLAGS_BACKUP 0x20 #define FFS_MISCFLAGS_REPROVISION 0x10 +#define FFS_MISCFLAGS_VOLATILE 0x08 /** * struct __ffs_entry_user - On flash user data entries diff --git a/libflash/libffs.c b/libflash/libffs.c index 038f594..87c5197 100644 --- a/libflash/libffs.c +++ b/libflash/libffs.c @@ -723,7 +723,9 @@ int ffs_entry_user_set(struct ffs_entry *ent, struct ffs_entry_user *user) if (user->vercheck & ~(FFS_VERCHECK_SHA512V | FFS_VERCHECK_SHA512EC)) return -1; if (user->miscflags & ~(FFS_MISCFLAGS_PRESERVED | FFS_MISCFLAGS_BACKUP | - FFS_MISCFLAGS_READONLY | FFS_MISCFLAGS_REPROVISION)) + FFS_MISCFLAGS_READONLY | FFS_MISCFLAGS_REPROVISION | + FFS_MISCFLAGS_VOLATILE +)) return -1; memcpy(&ent->user, user, sizeof(*user)); diff --git a/libflash/libffs.h b/libflash/libffs.h index a0f65a0..0610399 100644 --- a/libflash/libffs.h +++ b/libflash/libffs.h @@ -88,6 +88,7 @@ struct ffs_entry_user { #define FFS_MISCFLAGS_READONLY 0x40 #define FFS_MISCFLAGS_BACKUP 0x20 #define FFS_MISCFLAGS_REPROVISION 0x10 +#define FFS_MISCFLAGS_VOLATILE 0x08 bool has_ecc(struct ffs_entry *ent); |