summaryrefslogtreecommitdiff
path: root/os/src/fstat.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-02-05 04:35:27 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-02-05 04:35:27 +0100
commit61ba39a23786a7ae9694705af1d146c00a319144 (patch)
treef9ad51bee751f7e878ac3e7ad4d45f993605c37d /os/src/fstat.c
parente2d292afdb43cd7d9391128563384e1edd53c52e (diff)
Getting rid of newlib, starting to implement a libc. Highly experimental, highly untested.
Diffstat (limited to 'os/src/fstat.c')
-rw-r--r--os/src/fstat.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/os/src/fstat.c b/os/src/fstat.c
deleted file mode 100644
index a7c251f..0000000
--- a/os/src/fstat.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <reent.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <errno.h>
-#include "fio.h"
-#include "osdebug.h"
-
-int _fstat_r(struct _reent * reent, int fd, struct stat * buf) {
- off_t c;
-// DBGOUT("_fstat_r(%p, %i, %p)\r\n", reent, fd, buf);
- memset(buf, 0, sizeof(struct stat));
-
- if (!fio_is_open(fd)) {
- reent->_errno = EBADF;
- return -1;
- }
-
- buf->st_mode = S_IFCHR;
- buf->st_blksize = 1024;
- c = fio_seek(fd, 0, SEEK_CUR);
- if (c >= 0) {
- buf->st_size = fio_seek(fd, 0, SEEK_END);
- fio_seek(fd, c, SEEK_SET);
- }
-
- return 0;
-}