diff options
author | Russell Currey <ruscur@russell.cc> | 2023-02-10 11:03:42 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-02-12 14:12:37 +0300 |
commit | ec2f40bd004b4b9142469282d4a6ce9afa22f9c0 (patch) | |
tree | 7d36e3f86fab7c414a52d32e6aee2e88145ac570 /arch/powerpc/include/asm/secvar.h | |
parent | 16943a2faf94ef671e60c7577511c0d119fbdfc8 (diff) | |
download | linux-ec2f40bd004b4b9142469282d4a6ce9afa22f9c0.tar.xz |
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/asm/secvar.h')
-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 |