diff options
author | Michael Brown <mcb30@ipxe.org> | 2021-06-07 13:26:01 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-06-07 13:26:01 +0100 |
commit | 3dd1989ac0c0b699adcfe5c1c0efa2b229fd1e86 (patch) | |
tree | 2b9a94ed2be8c9e3a3fa6c2ea5c13cb4f9d630b9 | |
parent | 52300ccf98f94d48dbde84626097c7c22cfdf867 (diff) | |
download | ipxe-3dd1989ac0c0b699adcfe5c1c0efa2b229fd1e86.zip ipxe-3dd1989ac0c0b699adcfe5c1c0efa2b229fd1e86.tar.gz ipxe-3dd1989ac0c0b699adcfe5c1c0efa2b229fd1e86.tar.bz2 |
[libc] Match standard prototype for putchar()
Reported-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | src/core/console.c | 5 | ||||
-rw-r--r-- | src/include/stdio.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/core/console.c b/src/core/console.c index 7fd0003..2b90809 100644 --- a/src/core/console.c +++ b/src/core/console.c @@ -20,11 +20,12 @@ unsigned int console_height = CONSOLE_DEFAULT_HEIGHT; * Write a single character to each console device * * @v character Character to be written + * @ret character Character written * * The character is written out to all enabled console devices, using * each device's console_driver::putchar() method. */ -void putchar ( int character ) { +int putchar ( int character ) { struct console_driver *console; /* Automatic LF -> CR,LF translation */ @@ -37,6 +38,8 @@ void putchar ( int character ) { console->putchar ) console->putchar ( character ); } + + return character; } /** diff --git a/src/include/stdio.h b/src/include/stdio.h index a618482..ac17da8 100644 --- a/src/include/stdio.h +++ b/src/include/stdio.h @@ -6,7 +6,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include <stdint.h> #include <stdarg.h> -extern void putchar ( int character ); +extern int putchar ( int character ); extern int getchar ( void ); |