aboutsummaryrefslogtreecommitdiff
path: root/pk
diff options
context:
space:
mode:
Diffstat (limited to 'pk')
-rw-r--r--pk/file.c8
-rw-r--r--pk/file.h1
-rw-r--r--pk/frontend.c17
-rw-r--r--pk/frontend.h2
4 files changed, 0 insertions, 28 deletions
diff --git a/pk/file.c b/pk/file.c
index 502ff6a..279e8c4 100644
--- a/pk/file.c
+++ b/pk/file.c
@@ -155,14 +155,6 @@ ssize_t file_pwrite(file_t* f, const void* buf, size_t size, off_t offset)
return frontend_syscall(SYS_pwrite, f->kfd, va2pa(buf), size, offset, 0, 0, 0);
}
-int file_stat(file_t* f, struct stat* s)
-{
- struct frontend_stat buf;
- long ret = frontend_syscall(SYS_fstat, f->kfd, va2pa(&buf), 0, 0, 0, 0, 0);
- copy_stat(s, &buf);
- return ret;
-}
-
int file_truncate(file_t* f, off_t len)
{
return frontend_syscall(SYS_ftruncate, f->kfd, len, 0, 0, 0, 0, 0);
diff --git a/pk/file.h b/pk/file.h
index f761e28..2dd7798 100644
--- a/pk/file.h
+++ b/pk/file.h
@@ -32,7 +32,6 @@ ssize_t file_write(file_t* f, const void* buf, size_t n);
ssize_t file_read(file_t* f, void* buf, size_t n);
ssize_t file_lseek(file_t* f, size_t ptr, int dir);
int file_truncate(file_t* f, off_t len);
-int file_stat(file_t* f, struct stat* s);
int fd_close(int fd);
void file_init();
diff --git a/pk/frontend.c b/pk/frontend.c
index e58df26..a02cb89 100644
--- a/pk/frontend.c
+++ b/pk/frontend.c
@@ -36,20 +36,3 @@ void shutdown(int code)
frontend_syscall(SYS_exit, code, 0, 0, 0, 0, 0, 0);
while (1);
}
-
-void copy_stat(struct stat* dest, struct frontend_stat* src)
-{
- dest->st_dev = src->dev;
- dest->st_ino = src->ino;
- dest->st_mode = src->mode;
- dest->st_nlink = src->nlink;
- dest->st_uid = src->uid;
- dest->st_gid = src->gid;
- dest->st_rdev = src->rdev;
- dest->st_size = src->size;
- dest->st_blksize = src->blksize;
- dest->st_blocks = src->blocks;
- dest->st_atime = src->atime;
- dest->st_mtime = src->mtime;
- dest->st_ctime = src->ctime;
-}
diff --git a/pk/frontend.h b/pk/frontend.h
index 7da3c81..1a6be61 100644
--- a/pk/frontend.h
+++ b/pk/frontend.h
@@ -32,6 +32,4 @@ struct frontend_stat {
uint32_t __unused5;
};
-void copy_stat(struct stat* dest, struct frontend_stat* src);
-
#endif