AquilaOS documentation
How it works, and its code
Toggle main menu visibility
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
19
ssize_t
rofs_write
(
struct
vnode
*
vnode
,
off_t
offset,
struct
iobuf
*io)
20
{
21
return
-EROFS;
22
}
23
31
int
rofs_trunc
(
struct
vnode
*
vnode
,
off_t
len)
32
{
33
return
-EROFS;
34
}
35
47
int
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
60
int
rofs_vunlink
(
struct
vnode
*dir,
const
char
*fn,
struct
uio
*
uio
)
61
{
62
return
-EROFS;
63
}
64
74
int
rofs_vlink
(
struct
vnode
*dir,
const
char
*fn,
struct
vnode
*
vnode
,
struct
uio
*
uio
)
75
{
76
return
-EROFS;
77
}
78
89
int
rofs_vrename
(
struct
vnode
*odir,
const
char
*ofn,
struct
vnode
*ndir,
const
char
*nfn,
struct
uio
*
uio
)
90
{
91
return
-EROFS;
92
}
93
100
int
rofs_setattr
(
struct
vnode
*
vnode
)
101
{
102
return
-EROFS;
103
}
system.h
rofs_write
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
rofs_setattr
int rofs_setattr(struct vnode *vnode)
Refuses to change a node's attributes on a read-only filesystem.
Definition
rofs.c:100
rofs_vunlink
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
rofs_vmknod
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
rofs_vrename
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
rofs_trunc
int rofs_trunc(struct vnode *vnode, off_t len)
Refuses to truncate a file on a read-only filesystem.
Definition
rofs.c:31
rofs_vlink
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
rofs.h
uint32_t
unsigned int uint32_t
Definition
stddef.h:22
dev
A device driver: its operations, any of which may be NULL.
Definition
dev.h:28
iobuf
An iobuf.
Definition
iobuf.h:35
uio
Who does a filesystem operation: where its paths start, and its credentials and umask.
Definition
vfs.h:60
vnode
A file in memory (a vnode): what its inode says, and the kernel's own state.
Definition
vfs.h:113
dev_t
uint16_t dev_t
Definition
types.h:18
ssize_t
long int ssize_t
Definition
types.h:12
off_t
long int off_t
Definition
types.h:10
vfs.h
kernel
fs
rofs.c
Generated by
1.18.0