diff options
-rw-r--r-- | lib/lib.c | 2 | ||||
-rw-r--r-- | lib/lib.h | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -550,7 +550,7 @@ char *readfile(char *name) if (fd == -1) return 0; len = fdlength(fd); buf = xmalloc(len+1); - buf[xread(fd, buf, len)] = 0; + buf[xreadall(fd, buf, len)] = 0; return buf; } @@ -73,6 +73,8 @@ ssize_t writeall(int fd, void *buf, size_t len); size_t xread(int fd, void *buf, size_t len); void xreadall(int fd, void *buf, size_t len); void xwrite(int fd, void *buf, size_t len); +char *readfile(char *name); +char *xreadfile(char *name); char *xgetcwd(void); void xstat(char *path, struct stat *st); char *xabspath(char *path); |