Basic bringup
This commit is contained in:
parent
50d4d868a8
commit
6c95233afe
1 changed files with 31 additions and 1 deletions
32
sortix.c
32
sortix.c
|
@ -1,12 +1,42 @@
|
|||
/* sortix.c
|
||||
* Sortix display(1) support
|
||||
* (c) 2021 Juhani 'nortti' Krekelä
|
||||
* This file is a part of the Links program, released under GPL.
|
||||
*/
|
||||
|
||||
#include "cfg.h"
|
||||
|
||||
#ifdef GRDRV_SORTIX
|
||||
|
||||
#include <display.h>
|
||||
#include <err.h> //debg
|
||||
#include <errno.h>
|
||||
|
||||
#include "links.h"
|
||||
|
||||
struct display_connection* sortix_display;
|
||||
|
||||
unsigned char *sortix_init_driver(unsigned char *param, unsigned char *display)
|
||||
{
|
||||
if (param && *param)
|
||||
errx(1, "param %s", param);
|
||||
if (display && *display)
|
||||
errx(1, "display %s", display);
|
||||
|
||||
sortix_display = display_connect_default();
|
||||
if (!sortix_display && errno == ECONNREFUSED)
|
||||
return "TODO: display_spawn";
|
||||
|
||||
if ( !sortix_display )
|
||||
return "TODO: Proper error reporting";
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct graphics_driver sortix_driver =
|
||||
{
|
||||
"sortix"
|
||||
(unsigned char *)"sortix",
|
||||
sortix_init_driver,
|
||||
};
|
||||
|
||||
#endif /* GRDRV_SORTIX */
|
||||
|
|
Loading…
Reference in a new issue