summaryrefslogtreecommitdiff
path: root/src/cmd/drawmouse/drawmouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/drawmouse/drawmouse.c')
-rw-r--r--src/cmd/drawmouse/drawmouse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/drawmouse/drawmouse.c b/src/cmd/drawmouse/drawmouse.c
index 31a1255..c65030c 100644
--- a/src/cmd/drawmouse/drawmouse.c
+++ b/src/cmd/drawmouse/drawmouse.c
@@ -1,5 +1,6 @@
#include <camellia.h>
#include <camellia/syscalls.h>
+#include <err.h>
#include <shared/ring.h>
#include <stdbool.h>
#include <stdio.h>
@@ -9,8 +10,6 @@
#define MOUSE_SIZE 10
-#define eprintf(fmt, ...) fprintf(stderr, "drawmouse: "fmt"\n" __VA_OPT__(,) __VA_ARGS__)
-
struct framebuf fb, lastbehind;
struct rect dirty;
@@ -52,12 +51,12 @@ int main(void) {
char buf[64];
hid_t fd = camellia_open("/kdev/ps2/mouse", OPEN_READ);
if (fd < 0) {
- eprintf("couldn't open mouse");
+ err(1, "open");
return 1;
}
if (fb_setup(&fb, "/kdev/video/") < 0) {
- eprintf("fb_setup error");
+ err(1, "fb_setup");
return 1;
}
fb_anon(&lastbehind, MOUSE_SIZE, MOUSE_SIZE);