62 newPos =
file->pos + offset;
file_t * file_new(inode_t *inode, const path_t *path, path_flags_t flags)
Create a new file structure.
uint64_t file_generic_seek(file_t *file, int64_t offset, seek_origin_t origin)
Helper function for basic seeking.
void path_put(path_t *path)
Put a path.
void path_copy(path_t *dest, const path_t *src)
Copy a path.
#define PATH_EMPTY
Helper to create an empty path.
#define MUTEX_SCOPE(mutex)
Acquires a mutex for the reminder of the current scope.
static void ref_init(ref_t *ref, void *free)
Initialize a reference counter.
#define REF(ptr)
Increment reference count.
#define DEREF(ptr)
Decrement reference count.
#define EINVAL
Invalid argument.
#define errno
Error number variable.
uint8_t seek_origin_t
Type for the seek() origin argument.
#define NULL
Pointer error value.
#define ERR
Integer error value.
static void file_free(file_t *file)
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
const file_ops_t * fileOps
Constant after creation.