src/server/test/vfs.c

branch
webdav
changeset 241
4adad7faf452
parent 220
2915b6c11aec
child 248
bc8f8ddbad2e
--- a/src/server/test/vfs.c	Sat Jan 25 15:34:30 2020 +0100
+++ b/src/server/test/vfs.c	Sat Jan 25 21:37:38 2020 +0100
@@ -113,11 +113,11 @@
 
 /* vfs funcs */
 
-SYS_FILE testvfs_open(VFSContext *ctx, char *path, int oflags) {
+SYS_FILE testvfs_open(VFSContext *ctx, const char *path, int oflags) {
     TestVFS *vfs = ctx->vfs->instance;  
     TestVFSFile *file = NULL;
     
-    sstr_t s_path = sstr(path);
+    sstr_t s_path = sstr((char*)path);
     if(sstrsuffix(s_path, S("/"))) {
         s_path.length--;
     }
@@ -136,11 +136,11 @@
     return (SYS_FILE)file;
 }
 
-int testvfs_stat(VFSContext *ctx, char *path, struct stat *buf) {
+int testvfs_stat(VFSContext *ctx, const char *path, struct stat *buf) {
     TestVFS *vfs = ctx->vfs->instance;  
     TestVFSFile *file = NULL;
     
-    sstr_t s_path = sstr(path);
+    sstr_t s_path = sstr((char*)path);
     if(sstrsuffix(s_path, S("/"))) {
         s_path.length--;
     }
@@ -156,11 +156,11 @@
     return 0;
 }
 
-VFS_DIR testvfs_opendir(VFSContext *ctx, char *path) {
+VFS_DIR testvfs_opendir(VFSContext *ctx, const char *path) {
     TestVFS *vfs = ctx->vfs->instance;  
     TestVFSFile *file = NULL;
     
-    sstr_t s_path = sstr(path);
+    sstr_t s_path = sstr((char*)path);
     if(sstrsuffix(s_path, S("/"))) {
         s_path.length--;
     }
@@ -203,7 +203,7 @@
     return (VFS_DIR)dir;
 }
 
-int testvfs_mkdir(VFSContext *ctx, char *path) {
+int testvfs_mkdir(VFSContext *ctx, const char *path) {
     SYS_FILE fd = testvfs_open(ctx, path, O_CREAT);
     if(!fd) {
         return 1;
@@ -215,7 +215,7 @@
     return 0;
 }
 
-int testvfs_unlink(VFSContext *ctx, char *path) {
+int testvfs_unlink(VFSContext *ctx, const char *path) {
     return 0;
 }
 

mercurial