Basic bringup

This commit is contained in:
Juhani Krekelä 2021-08-28 21:00:36 +03:00
parent bcf8e63a0b
commit ab10b418bb
1 changed files with 31 additions and 1 deletions

View File

@ -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 */