Go to the documentation of this file.
12 #include <sys/cdefs.h>
15 #include <sys/types.h>
18 #include <sys/queue.h>
72 #define STAT_UNIQUE_NONE 0
76 #define STAT_TYPE_NONE 0
79 #define STAT_TYPE_FILE 1
82 #define STAT_TYPE_DIR 2
85 #define STAT_TYPE_PIPE 3
88 #define STAT_TYPE_META 4
91 #define STAT_TYPE_SYMLINK 5
94 #define STAT_ATTR_NONE 0x00
95 #define STAT_ATTR_R 0x01
96 #define STAT_ATTR_W 0x02
99 #define STAT_ATTR_RW (STAT_ATTR_R | STAT_ATTR_W)
105 #define FILEHND_INVALID ((file_t)-1)
130 ssize_t (*
read)(
void *hnd,
void *buffer,
size_t cnt);
133 ssize_t (*
write)(
void *hnd,
const void *buffer,
size_t cnt);
136 off_t(*
seek)(
void *hnd, off_t offset,
int whence);
148 int (*
ioctl)(
void *hnd,
void *data,
size_t size);
157 void *(*mmap)(
void *fd);
173 int (*
fcntl)(
void *fd,
int cmd, va_list ap);
176 short (*
poll)(
void *fd,
short events);
201 #define FD_SETSIZE 1024
213 #include <sys/fcntl.h>
218 #define O_MODE_MASK 0x0f
220 #define O_ASYNC 0x0200
223 #define O_META 0x2000
389 int fs_rename(
const char *fn1,
const char *fn2);
498 int fs_link(
const char *path1,
const char *path2);
515 int fs_symlink(
const char *path1,
const char *path2);
592 ssize_t
fs_copy(
const char *src,
const char *dst);
604 ssize_t
fs_load(
const char *src,
void **out_ptr);