diff options
author | dzwdz | 2023-08-30 00:03:43 +0200 |
---|---|---|
committer | dzwdz | 2023-08-30 00:03:43 +0200 |
commit | cf7877737ff5032f8bad59d57b048f66c4813b5b (patch) | |
tree | ec9c66772331594c30b34062a2cb0f72719d6f6e /src/cmd/drawmouse | |
parent | f71af249cfb9ca9eb0832cc46437b2c5cb7bb217 (diff) |
style: get rid of eprintf
Diffstat (limited to 'src/cmd/drawmouse')
-rw-r--r-- | src/cmd/drawmouse/drawmouse.c | 7 |
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); |