PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
swrite.c
Go to the documentation of this file.
1#include <string.h>
2#include <sys/io.h>
3
4uint64_t swrite(fd_t fd, const char* string)
5{
6 size_t length = strlen(string);
7 return write(fd, string, length);
8}
uint64_t swrite(fd_t fd, const char *string)
Wrapper for writing a null-terminated string to a file.
Definition swrite.c:4
uint64_t write(fd_t fd, const void *buffer, uint64_t count)
System call for writing to files.
Definition write.c:9
__UINT64_TYPE__ fd_t
A file descriptor.
Definition fd_t.h:12
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
_PUBLIC size_t strlen(const char *s)
Definition strlen.c:3