1/**
2 * \file
3 * \brief RAMFS header
4 */
5
6/*
7 * Copyright (c) 2010, 2011, ETH Zurich.
8 * All rights reserved.
9 *
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
13 */
14
15#include <sys/types.h>
16
17/* ramfs.c */
18struct dirent;
19
20struct dirent *ramfs_init(void);
21void ramfs_incref(struct dirent *e);
22void ramfs_decref(struct dirent *e);
23
24const char *ramfs_get_name(struct dirent *e);
25bool ramfs_isdir(struct dirent *e);
26size_t ramfs_get_size(struct dirent *e);
27bool ramfs_islive(struct dirent *e);
28
29errval_t ramfs_readdir(struct dirent *dir, uint32_t index, struct dirent **ret);
30errval_t ramfs_lookup(struct dirent *dir, const char *name, struct dirent **ret);
31errval_t ramfs_read(struct dirent *f, off_t offset, uint8_t **retbuf,
32                    size_t *maxlen);
33errval_t ramfs_grow(struct dirent *f, off_t offset, size_t len, uint8_t **retbuf);
34errval_t ramfs_resize(struct dirent *f, size_t newlen);
35errval_t ramfs_create(struct dirent *dir, const char *name, struct dirent **ret);
36errval_t ramfs_mkdir(struct dirent *dir, const char *name, struct dirent **ret);
37errval_t ramfs_delete(struct dirent *e);
38
39/* service.c */
40errval_t start_service(struct dirent *root);
41