diff -r cd74667f6c85 -r 4adad7faf452 src/server/public/vfs.h --- a/src/server/public/vfs.h Sat Jan 25 15:34:30 2020 +0100 +++ b/src/server/public/vfs.h Sat Jan 25 21:37:38 2020 +0100 @@ -48,13 +48,13 @@ #define VFS_ENTRY VFSEntry struct VFS { - SYS_FILE (*open)(VFSContext *ctx, char *path, int oflags); - int (*stat)(VFSContext *ctx, char *path, struct stat *buf); + SYS_FILE (*open)(VFSContext *ctx, const char *path, int oflags); + int (*stat)(VFSContext *ctx, const char *path, struct stat *buf); int (*fstat)(VFSContext *ctx, SYS_FILE fd, struct stat *buf); - VFS_DIR (*opendir)(VFSContext *ctx, char *path); + VFS_DIR (*opendir)(VFSContext *ctx, const char *path); VFS_DIR (*fdopendir)(VFSContext *ctx, SYS_FILE fd); - int (*mkdir)(VFSContext *ctx, char *path); - int (*unlink)(VFSContext *ctx, char *path); + int (*mkdir)(VFSContext *ctx, const char *path); + int (*unlink)(VFSContext *ctx, const char *path); uint32_t flags; void *instance; }; @@ -118,20 +118,20 @@ */ VFSContext* vfs_request_context(Session *sn, Request *rq); -SYS_FILE vfs_open(VFSContext *ctx, char *path, int oflags); -SYS_FILE vfs_openRO(VFSContext *ctx, char *path); -SYS_FILE vfs_openWO(VFSContext *ctx, char *path); -SYS_FILE vfs_openRW(VFSContext *ctx, char *path); -int vfs_stat(VFSContext *ctx, char *path, struct stat *buf); +SYS_FILE vfs_open(VFSContext *ctx, const char *path, int oflags); +SYS_FILE vfs_openRO(VFSContext *ctx, const char *path); +SYS_FILE vfs_openWO(VFSContext *ctx, const char *path); +SYS_FILE vfs_openRW(VFSContext *ctx, const char *path); +int vfs_stat(VFSContext *ctx, const char *path, struct stat *buf); int vfs_fstat(VFSContext *ctx, SYS_FILE fd, struct stat *buf); void vfs_close(SYS_FILE fd); -VFS_DIR vfs_opendir(VFSContext *ctx, char *path); +VFS_DIR vfs_opendir(VFSContext *ctx, const char *path); VFS_DIR vfs_fdopendir(VFSContext *ctx, SYS_FILE fd); int vfs_readdir(VFS_DIR dir, VFS_ENTRY *entry); int vfs_readdir_stat(VFS_DIR dir, VFS_ENTRY *entry); void vfs_closedir(VFS_DIR dir); -int vfs_mkdir(VFSContext *ctx, char *path); -int vfs_unlink(VFSContext *ctx, char *path); +int vfs_mkdir(VFSContext *ctx, const char *path); +int vfs_unlink(VFSContext *ctx, const char *path); #ifdef __cplusplus }