mirror of
https://github.com/apache/nuttx.git
synced 2026-05-09 23:12:17 +08:00
arch/x86: Modify qemu_vga to return init error
This modify just modify the function to let the user that the function failed to initialize the VGA mode. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
f25db33113
commit
163dcd0438
@@ -561,14 +561,17 @@ struct lcd_dev_s *qemu_vga_initialize(void)
|
||||
return &g_lcddev;
|
||||
}
|
||||
|
||||
void qemu_vga(void)
|
||||
int qemu_vga(void)
|
||||
{
|
||||
int ret = init_graph_vga(VGA_XRES, VGA_YRES, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("ERROR: init_graph_vga returned %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
memset(g_pscreen, g_bg_color, VGA_XRES * VGA_YRES);
|
||||
register_driver("/dev/lcd", &g_vgaops, 0666, NULL);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,6 @@
|
||||
|
||||
struct lcd_dev_s *qemu_vga_initialize(void);
|
||||
|
||||
void qemu_vga(void);
|
||||
int qemu_vga(void);
|
||||
|
||||
#endif /* __ARCH_X86_SRC_QEMU_QEMU_VGA_H */
|
||||
|
||||
Reference in New Issue
Block a user