51 return open(n, O_RDONLY);
64 return open(n, s, 0600);
76 cfs_read(
int f,
void *b,
unsigned int l)
82 cfs_write(
int f,
const void *b,
unsigned int l)
84 return write(f, b, l);
97 return (cfs_offset_t)-1;
99 return lseek(f, o, w);
int cfs_open(const char *name, int flags)
Open a file.
cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence)
Seek to a specified position in an open file.
#define CFS_SEEK_CUR
Specify that cfs_seek() should compute the offset from the current position of the file pointer...
#define CFS_WRITE
Specify that cfs_open() should open a file for writing.
#define CFS_SEEK_END
Specify that cfs_seek() should compute the offset from the end of the file.
#define CFS_READ
Specify that cfs_open() should open a file for reading.
#define CFS_APPEND
Specify that cfs_open() should append written data to the file rather than overwriting it...
int cfs_remove(const char *name)
Remove a file.
#define CFS_SEEK_SET
Specify that cfs_seek() should compute the offset from the beginning of the file. ...
void cfs_close(int fd)
Close an open file.