diff options
author | 2023-02-10 19:03:42 +1100 | |
---|---|---|
committer | 2023-02-12 22:12:37 +1100 | |
commit | ec2f40bd004b4b9142469282d4a6ce9afa22f9c0 (patch) | |
tree | 7d36e3f86fab7c414a52d32e6aee2e88145ac570 /arch/powerpc/include | |
parent | powerpc/secvar: Use sysfs_emit() instead of sprintf() (diff) | |
download | linux-ec2f40bd004b4b9142469282d4a6ce9afa22f9c0.tar.gz linux-ec2f40bd004b4b9142469282d4a6ce9afa22f9c0.tar.bz2 linux-ec2f40bd004b4b9142469282d4a6ce9afa22f9c0.zip |
powerpc/secvar: Handle format string in the consumer
The code that handles the format string in secvar-sysfs.c is entirely
OPAL specific, so create a new "format" op in secvar_operations to make
the secvar code more generic. No functional change.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-8-ajd@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/secvar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/secvar.h b/arch/powerpc/include/asm/secvar.h index a2b5f2203dc5..1a2c696a48ad 100644 --- a/arch/powerpc/include/asm/secvar.h +++ b/arch/powerpc/include/asm/secvar.h @@ -17,6 +17,7 @@ struct secvar_operations { int (*get)(const char *key, u64 key_len, u8 *data, u64 *data_size); int (*get_next)(const char *key, u64 *key_len, u64 keybufsize); int (*set)(const char *key, u64 key_len, u8 *data, u64 data_size); + ssize_t (*format)(char *buf, size_t bufsize); }; #ifdef CONFIG_PPC_SECURE_BOOT |