AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
rofs.c
Go to the documentation of this file.
1
6
7#include <core/system.h>
8#include <fs/vfs.h>
9#include <fs/rofs.h>
10
19ssize_t rofs_write(struct vnode *vnode, off_t offset, struct iobuf *io)
20{
21 return -EROFS;
22}
23
31int rofs_trunc(struct vnode *vnode, off_t len)
32{
33 return -EROFS;
34}
35
47int rofs_vmknod(struct vnode *dir, const char *fn, uint32_t mode, dev_t dev, struct uio *uio, struct vnode **ref)
48{
49 return -EROFS;
50}
51
60int rofs_vunlink(struct vnode *dir, const char *fn, struct uio *uio)
61{
62 return -EROFS;
63}
64
74int rofs_vlink(struct vnode *dir, const char *fn, struct vnode *vnode, struct uio *uio)
75{
76 return -EROFS;
77}
78
89int rofs_vrename(struct vnode *odir, const char *ofn, struct vnode *ndir, const char *nfn, struct uio *uio)
90{
91 return -EROFS;
92}
93
101{
102 return -EROFS;
103}
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