diff options
author | Quinn Stephens <quinn@osmora.org> | 2025-06-06 13:49:53 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-07 18:18:23 -0400 |
commit | 75193df68e776a469bc4a40445db6f4d7943a21e (patch) | |
tree | b1dfb53d4d6d987e95209d043d8e5f7045dddcac /usr.bin/fetch/fetch.c | |
parent | f7ed50328af7b6a5151f86126a3491a768a7d1ff (diff) |
usr.bin: Use stdio for console access
Modified fetch, kmsg, and osh to use stdio.h routines instead of just
raw file descriptors.
Signed-off-by: Quinn Stephens <quinn@osmora.org>
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'usr.bin/fetch/fetch.c')
-rw-r--r-- | usr.bin/fetch/fetch.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 98b2d3c..42c2825 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -30,8 +30,7 @@ #include <unistd.h> #include <fcntl.h> #include <string.h> - -#define prcons(FD, STR) write((FD), (STR), strlen((STR))) +#include <stdio.h> #define ASCII_ART \ " ____ \n" \ @@ -39,20 +38,12 @@ " | /\\ \\ user: root\n" \ " |/ \\ \\ OS: Hyra/amd64 v"_OSVER"\n" \ " \\ R. \\ \\ arch: "_OSARCH"\n" \ - " \\ I. \\ \\\n" + " \\ I. \\ \\" int main(void) { - int fd; - - fd = open("/dev/console", O_WRONLY); - if (fd < 0) { - return fd; - } - - prcons(fd, ASCII_ART); - close(fd); + puts(ASCII_ART); return 0; } |