summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/libc/console.c')
-rw-r--r--payloads/libpayload/libc/console.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/payloads/libpayload/libc/console.c b/payloads/libpayload/libc/console.c
index bb7dec1f94..b2b115b835 100644
--- a/payloads/libpayload/libc/console.c
+++ b/payloads/libpayload/libc/console.c
@@ -42,7 +42,7 @@ void console_init(void)
static void device_putchar(unsigned char c)
{
#ifdef CONFIG_VGA_CONSOLE
- vga_putchar(0x700| c);
+ vga_putchar(0x700 | c);
#endif
#ifdef CONFIG_SERIAL_CONSOLE
serial_putchar(c);
@@ -65,10 +65,10 @@ int puts(const char *s)
while (*s) {
putchar(*s++);
n++;
- }
-
+ }
+
putchar('\n');
- return n+1;
+ return n + 1;
}
int havekey(void)
@@ -81,13 +81,13 @@ int havekey(void)
if (keyboard_havechar())
return 1;
#endif
- return 0;
+ return 0;
}
-/* This returns an ascii value - the two getchar functions
- cook the respective input from the device
-*/
-
+/**
+ * This returns an ASCII value - the two getchar functions
+ * cook the respective input from the device.
+ */
int getchar(void)
{
while (1) {
@@ -101,4 +101,3 @@ int getchar(void)
#endif
}
}
-