aboutsummaryrefslogtreecommitdiff
path: root/pk/file.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@eecs.berkeley.edu>2014-02-04 15:29:06 -0800
committerAndrew Waterman <waterman@eecs.berkeley.edu>2014-02-04 15:29:06 -0800
commitf1f8dbbed01d67a3cb64a17c73078d124c33d2ab (patch)
tree77181fb45946e2a5883b87d09d65d08439186672 /pk/file.h
parentac88604e8850779c33ec888ccc8399604fb2677c (diff)
downloadpk-f1f8dbbed01d67a3cb64a17c73078d124c33d2ab.zip
pk-f1f8dbbed01d67a3cb64a17c73078d124c33d2ab.tar.gz
pk-f1f8dbbed01d67a3cb64a17c73078d124c33d2ab.tar.bz2
Abandon MIPS convention for indicating syscall errors in register a3
Diffstat (limited to 'pk/file.h')
-rw-r--r--pk/file.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/pk/file.h b/pk/file.h
index 42f47fc..88338e6 100644
--- a/pk/file.h
+++ b/pk/file.h
@@ -16,17 +16,17 @@ typedef struct file
extern file_t *stdin, *stdout, *stderr;
file_t* file_get(int fd);
-sysret_t file_open(const char* fn, int flags, int mode);
+file_t* file_open(const char* fn, int flags, int mode);
void file_decref(file_t*);
void file_incref(file_t*);
int file_dup(file_t*);
-sysret_t file_pwrite(file_t* f, const void* buf, size_t n, off_t off);
-sysret_t file_pread(file_t* f, void* buf, size_t n, off_t off);
-sysret_t file_write(file_t* f, const void* buf, size_t n);
-sysret_t file_read(file_t* f, void* buf, size_t n);
-sysret_t file_stat(file_t* f, struct stat* s);
-sysret_t file_lseek(file_t* f, size_t ptr, int dir);
+ssize_t file_pwrite(file_t* f, const void* buf, size_t n, off_t off);
+ssize_t file_pread(file_t* f, void* buf, size_t n, off_t off);
+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_stat(file_t* f, struct stat* s);
int fd_close(int fd);
void file_init();