AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
rofs.h
Go to the documentation of this file.
1#ifndef _FS_ROFS_H
2#define _FS_ROFS_H
3
4/* Read-only filesystems' operations (fs/rofs.c): the ones that change
5 * anything fail with EROFS. */
6
7ssize_t rofs_write(struct vnode *vnode, off_t offset, struct iobuf *io);
8int rofs_trunc(struct vnode *vnode, off_t len);
9int rofs_vmknod(struct vnode *dir, const char *fn, uint32_t mode, dev_t dev, struct uio *uio, struct vnode **ref);
10int rofs_vunlink(struct vnode *dir, const char *fn, struct uio *uio);
11int rofs_vlink(struct vnode *dir, const char *fn, struct vnode *vnode, struct uio *uio);
12int rofs_vrename(struct vnode *odir, const char *ofn, struct vnode *ndir, const char *nfn, struct uio *uio);
13int rofs_setattr(struct vnode *vnode);
14
15#endif /* _FS_ROFS_H */
ssize_t rofs_write(struct vnode *vnode, off_t offset, struct iobuf *io)
Refuses a write to a read-only filesystem.
Definition rofs.c:19
int rofs_setattr(struct vnode *vnode)
Refuses to change a node's attributes on a read-only filesystem.
Definition rofs.c:100
int rofs_vunlink(struct vnode *dir, const char *fn, struct uio *uio)
Refuses to remove a name from a read-only filesystem.
Definition rofs.c:60
int rofs_vmknod(struct vnode *dir, const char *fn, uint32_t mode, dev_t dev, struct uio *uio, struct vnode **ref)
Refuses to make a node on a read-only filesystem.
Definition rofs.c:47
int rofs_vrename(struct vnode *odir, const char *ofn, struct vnode *ndir, const char *nfn, struct uio *uio)
Refuses to rename on a read-only filesystem.
Definition rofs.c:89
int rofs_trunc(struct vnode *vnode, off_t len)
Refuses to truncate a file on a read-only filesystem.
Definition rofs.c:31
int rofs_vlink(struct vnode *dir, const char *fn, struct vnode *vnode, struct uio *uio)
Refuses to make a hard link on a read-only filesystem.
Definition rofs.c:74
unsigned int uint32_t
Definition stddef.h:22
A device driver: its operations, any of which may be NULL.
Definition dev.h:28
An iobuf.
Definition iobuf.h:35
Who does a filesystem operation: where its paths start, and its credentials and umask.
Definition vfs.h:60
A file in memory (a vnode): what its inode says, and the kernel's own state.
Definition vfs.h:113
uint16_t dev_t
Definition types.h:18
long int ssize_t
Definition types.h:12
long int off_t
Definition types.h:10