diff options
author | Marvin Borner | 2021-04-25 16:31:40 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-25 16:31:40 +0200 |
commit | 0fe14a1ff936c38ab9aa7f85219d0c155d276823 (patch) | |
tree | b3e4b1f9000819a564656fabf0496f871c1e6eba /kernel/inc/fs.h | |
parent | f2b4acb2fe6a366288b19843e0d2678b8590bdf4 (diff) |
Added range-based memory validator
Diffstat (limited to 'kernel/inc/fs.h')
-rw-r--r-- | kernel/inc/fs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/inc/fs.h b/kernel/inc/fs.h index 8dbf028..329af21 100644 --- a/kernel/inc/fs.h +++ b/kernel/inc/fs.h @@ -20,7 +20,7 @@ struct vfs_dev { struct vfs *vfs; void *data; res (*read)(void *buf, u32 offset, u32 count, struct vfs_dev *dev) NONNULL; - res (*write)(void *buf, u32 offset, u32 count, struct vfs_dev *dev) NONNULL; + res (*write)(const void *buf, u32 offset, u32 count, struct vfs_dev *dev) NONNULL; res (*ioctl)(u32 request, void *arg1, void *arg2, void *arg3, struct vfs_dev *dev) ATTR((nonnull(5))); }; @@ -38,7 +38,7 @@ struct vfs { void *data; res (*read)(const char *path, void *buf, u32 offset, u32 count, struct vfs_dev *dev) NONNULL; - res (*write)(const char *path, void *buf, u32 offset, u32 count, + res (*write)(const char *path, const void *buf, u32 offset, u32 count, struct vfs_dev *dev) NONNULL; res (*ioctl)(const char *path, u32 request, void *arg1, void *arg2, void *arg3, struct vfs_dev *dev) ATTR((nonnull(1, 6))); @@ -62,7 +62,7 @@ void vfs_add_dev(struct vfs_dev *dev) NONNULL; // No NONNULL on syscalls res vfs_read(const char *path, void *buf, u32 offset, u32 count); -res vfs_write(const char *path, void *buf, u32 offset, u32 count); +res vfs_write(const char *path, const void *buf, u32 offset, u32 count); res vfs_stat(const char *path, struct stat *buf); struct vfs_dev *device_get_by_name(const char *name) NONNULL; |