This commit is contained in:
veclavtlica
2026-10-12 21:52:52 +03:00
parent 8d2bb5575e
commit 964e623644
5 changed files with 28 additions and 16 deletions
+2 -2
View File
@@ -28,14 +28,14 @@ com_std_fd com_std_open(char const *path, uint32_t flags) {
}
bool com_std_write(com_std_fd fd, void const *data, uint32_t bytes) {
com_std_assert(fd != NULL && data != NULL && bytes != 0);
com_std_assert(data != NULL && bytes != 0);
bool s = fwrite(data, 1, bytes, fd) == bytes;
fflush(fd);
return s;
}
int32_t com_std_read(com_std_fd fd, void *data, uint32_t upto) {
com_std_assert(fd != NULL && data != NULL && upto != 0);
com_std_assert(data != NULL && upto != 0);
return fread(data, 1, upto, fd);
}