From 3d6a857b9186ef6304ea6cf04627c2b787169f29 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jul 2016 15:59:46 +0200 Subject: Make way for libc implementation --- src/sysbin/giosrv/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/sysbin/giosrv') diff --git a/src/sysbin/giosrv/main.c b/src/sysbin/giosrv/main.c index 37f0f3c..b8e0095 100644 --- a/src/sysbin/giosrv/main.c +++ b/src/sysbin/giosrv/main.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -62,7 +63,7 @@ int main(int argc, char **argv) { dbg_print("[giosrv] Starting up.\n"); // ---- Keyboard setup - kbd.fd = open("io:/input/pckbd", FM_READ); + kbd.fd = sc_open("io:/input/pckbd", FM_READ); if (kbd.fd == 0) PANIC("Could not open keyboard"); mainloop_fd_t kh; @@ -75,10 +76,10 @@ int main(int argc, char **argv) { mainloop_add_fd(&kh); // ---- VESA setup - srv.fd = open("io:/display/vesa", FM_IOCTL | FM_READ | FM_WRITE | FM_MMAP); + srv.fd = sc_open("io:/display/vesa", FM_IOCTL | FM_READ | FM_WRITE | FM_MMAP); if (srv.fd == 0) PANIC("Could not open fbdev"); - int r = ioctl(srv.fd, IOCTL_FB_GET_INFO, &srv.mode); + int r = sc_ioctl(srv.fd, IOCTL_FB_GET_INFO, &srv.mode); ASSERT(r == 1); dbg_printf("[giosrv] Running on FB %dx%d\n", srv.mode.width, srv.mode.height); @@ -86,7 +87,7 @@ int main(int argc, char **argv) { gipsrv = new_gip_handler(&giosrv_cb, &srv); ASSERT(gipsrv != 0); - gipsrv->mainloop_item.fd = 1; + gipsrv->mainloop_item.fd = STD_FD_GIOSRV; mainloop_add_fd(&gipsrv->mainloop_item); // ---- Enter main loop @@ -105,7 +106,7 @@ void send_buffer_info(gip_handler_t *h, giosrv_t *s) { gip_buffer_info_msg msg_data; msg_data.geom = s->mode; - if (!gen_token(s->fd, &msg_data.tok)) { + if (!sc_gen_token(s->fd, &msg_data.tok)) { dbg_printf("[giosrv] Could not generate token for buffer_info_msg.\n"); } else { dbg_printf("[giosrv] Generated token: %x %x\n", -- cgit v1.2.3