24 #include <libopenraw/io.h>
25 #include "io_private.h"
33 #define CHECK_PTR(p,r) \
34 if(p == NULL) { return r; }
41 return &posix_io_methods;
51 CHECK_PTR(methods, NULL);
52 return methods->
open(path, mode);
107 void *raw_mmap(
IOFileRef f,
size_t l, off_t offset)
114 int raw_munmap(
IOFileRef f,
void *addr,
size_t l)
IOFileRef raw_open(struct io_methods *methods, const char *path, int mode)
Raw open function.
int raw_close(IOFileRef f)
int raw_get_error(IOFileRef f)
char * raw_get_path(IOFileRef f)
struct io_methods * get_default_io_methods(void)
Get the default IO methods.
int raw_seek(IOFileRef f, off_t offset, int whence)
int raw_read(IOFileRef f, void *buf, size_t count)
struct io_methods * methods
IO methods for the IO subsystem.
off_t(* filesize)(IOFileRef f)
filesize method
int(* seek)(IOFileRef f, off_t offset, int whence)
seek in the file
IOFileRef(* open)(const char *path, int mode)
open method
int(* close)(IOFileRef f)
close method
int(* read)(IOFileRef f, void *buf, size_t count)
read method
int(* munmap)(IOFileRef f, void *addr, size_t l)
munmap method
void *(* mmap)(IOFileRef f, size_t l, off_t offset)
mmap method