]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[libc] Match standard prototype for putchar()
authorMichael Brown <mcb30@ipxe.org>
Mon, 7 Jun 2021 12:26:01 +0000 (13:26 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 7 Jun 2021 12:26:01 +0000 (13:26 +0100)
Reported-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/console.c
src/include/stdio.h

index 7fd00036f84b3ba12a7a2f27e2215f350c979211..2b90809bf8ea84aad560cd60ef1e42d7abe5b1c2 100644 (file)
@@ -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;
 }
 
 /**
index a618482ce88cb5b7a086b87d131fd47951b42941..ac17da83d3f4bbc721e178631f315ea19a42e6d5 100644 (file)
@@ -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 );