diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2020-05-18 15:06:56 -0400 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-05-19 10:30:31 +0200 |
commit | 2c7d1e30e5884dc6f6727ecd9417491c9f321b59 (patch) | |
tree | 3ce8ad0faa361e2c04dcbbc7fda3ae867747b14c /drivers/firmware/efi/libstub/efistub.h | |
parent | fd0528a24958b7e8d55669cf50749776308d4c5a (diff) | |
download | lwn-2c7d1e30e5884dc6f6727ecd9417491c9f321b59.tar.gz lwn-2c7d1e30e5884dc6f6727ecd9417491c9f321b59.zip |
efi/libstub: Add a basic printf implementation
Copy vsprintf from arch/x86/boot/printf.c to get a simple printf
implementation.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200518190716.751506-5-nivedita@alum.mit.edu
[ardb: add some missing braces in if...else clauses]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/efistub.h')
-rw-r--r-- | drivers/firmware/efi/libstub/efistub.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index 4f57611a65f2..caa7dcc71c69 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -3,6 +3,7 @@ #ifndef _DRIVERS_FIRMWARE_EFI_EFISTUB_H #define _DRIVERS_FIRMWARE_EFI_EFISTUB_H +#include <linux/compiler.h> #include <linux/efi.h> #include <linux/kernel.h> #include <linux/types.h> @@ -632,6 +633,8 @@ void *get_efi_config_table(efi_guid_t guid); void efi_char16_puts(efi_char16_t *); void efi_puts(const char *str); +__printf(1, 2) int efi_printk(char const *fmt, ...); + void efi_free(unsigned long size, unsigned long addr); char *efi_convert_cmdline(efi_loaded_image_t *image, int *cmd_line_len, |