libpayload/keyboard: Use bool
as return type
Use `bool` whenever `0` was used to indicate an error. The mixing of different types for return values was mildly confusing and potentially dangerous with the i8042 API close by that uses `0` for success. Change-Id: I876bb5076c4921f36e3438f359be8ac4c09248cc Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46723 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Patrick Georgi
parent
f56d65266c
commit
d9e543a5f9
@ -42,6 +42,7 @@
|
||||
#ifndef _LIBPAYLOAD_H
|
||||
#define _LIBPAYLOAD_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <libpayload-config.h>
|
||||
#include <compiler.h>
|
||||
#include <cbgfx.h>
|
||||
@ -186,7 +187,7 @@ int add_reset_handler(void (*new_handler)(void));
|
||||
*/
|
||||
void keyboard_init(void);
|
||||
void keyboard_disconnect(void);
|
||||
int keyboard_havechar(void);
|
||||
bool keyboard_havechar(void);
|
||||
unsigned char keyboard_get_scancode(void);
|
||||
int keyboard_getchar(void);
|
||||
int keyboard_set_layout(char *country);
|
||||
|
Reference in New Issue
Block a user