#ifndef _FD_H
#define _FD_H
struct file_descr_struct;
struct stat_struct;
struct vm_struct;
void fd_init();
void fd_print_info();
int fd_open(const char *fs_filename, int flags, struct file_descr_struct **file_descr);
void fd_close(struct file_descr_struct *file_descr);
int fd_get_close_on_exec(struct file_descr_struct *file_descr);
void fd_set_close_on_exec(struct file_descr_struct *file_descr, int close_on_exec);
void fd_dup(struct file_descr_struct *file_descr);
int fd_read(struct file_descr_struct *file_descr, char *fs_buf, unsigned int count);
int fd_write(struct file_descr_struct *file_descr, const char *fs_buf, unsigned int count);
long fd_seek(struct file_descr_struct *file_descr, long offset, int whence);
int fd_pipe(struct file_descr_struct *file_descr[2]);
int fd_stat(const struct file_descr_struct *file_descr, struct stat_struct *fs_buf);
int fd_ioctl(struct file_descr_struct *file_descr, int request, void *fs_arg);
int fd_map(struct vm_struct *vm, unsigned long start, unsigned long length, int prot, struct file_descr_struct *file_descr, unsigned long offset);
#endif