Go to the documentation of this file.
49 struct file *nfp = 0x0;
65 kprintf(
"[%s:%i] fdestroy() failed.", __FILE__, __LINE__);
102 #ifdef DEBUG_VFS_CALLS
114 if (args->
fd == pFD->
rFD) {
117 kprintf(
"[%s:%i] fdestroy() failed.", __FILE__, __LINE__);
121 if (args->
fd == pFD->
wFD) {
124 kprintf(
"[%s:%i] fdestroy() failed.", __FILE__, __LINE__);
138 kprintf(
"[%s:%i] fdestroy(0x%X, 0x%X) failed\n", __FILE__, __LINE__, fd, td->
o_files[args->
fd]);
152 volatile char *
buf = args->
buf;
169 while (pFD->
bCNT == 0 && rpCNT < 100) {
174 if (rpCNT >= 100 && pFD->
bCNT == 0) {
205 for (x = 0; x < args->
nbyte && c !=
'\n';) {
242 volatile char *
buf = args->
buf;
259 for (x = 0; x < args->
nbyte && c !=
'\n';) {
309 else if (uap->
fd == 1 && ((
struct file*) td->
o_files[1])->fd == 0x0) {
400 struct file *nfp = 0x0;
431 if (nfp->
fd == 0x0) {
433 kprintf(
"[%s:%i] fdestroy() failed.", __FILE__, __LINE__);
453 kprintf(
"[%s:%i]Path: %s", __FILE__, __LINE__, uap->
path);
int sys_getdirentries(struct thread *td, struct sys_getdirentries_args *args)
int sys_openat(struct thread *td, struct sys_openat_args *args)
fileDescriptor_t * fopen(const char *file, const char *flags)
int fl_remove(const char *filename)
size_t fread(void *ptr, size_t size, size_t nmemb, fileDescriptor_t *fd)
void kfree(void *baseAddr)
size_t fwrite(void *ptr, int size, int nmemb, fileDescriptor_t *fd)
int fdestroy(struct thread *td, struct file *fp, int fd)
This destroys a thread local file descriptor.
int falloc(struct thread *, struct file **, int *)
int sys_open(struct thread *td, struct sys_open_args *args)
void * memcpy(const void *dst, const void *src, size_t length)
int sys_unlink(struct thread *td, struct sys_unlink_args *uap)
int sys_write(struct thread *td, struct sys_write_args *uap)
int fclose(fileDescriptor_t *fd)
int sys_readlink(struct thread *thr, struct sys_readlink_args *args)
int getfd(struct thread *td, struct file **fp, int fd)
get pointer to file fd in specified thread
int sys_read(struct thread *td, struct sys_read_args *args)
int sys_access(struct thread *td, struct sys_access_args *args)
tty_term * tty_foreground
void * kmalloc(uInt32 len)
int kern_openat(struct thread *thr, int afd, char *path, int flags, int mode)
int sys_pread(struct thread *td, struct sys_pread_args *args)
int kprintf(const char *,...)
int sys_close(struct thread *td, struct sys_close_args *args)