Browse Source

Made the buf argument to vfs->write constant.

Roland Illig 20 years ago
parent
commit
dc70d154db
6 changed files with 7 additions and 7 deletions
  1. 1 1
      vfs/direntry.c
  2. 1 1
      vfs/extfs.c
  3. 1 1
      vfs/local.c
  4. 1 1
      vfs/mcfs.c
  5. 2 2
      vfs/smbfs.c
  6. 1 1
      vfs/vfs.h

+ 1 - 1
vfs/direntry.c

@@ -798,7 +798,7 @@ vfs_s_read (void *fh, char *buffer, int count)
 }
 
 static int
-vfs_s_write (void *fh, char *buffer, int count)
+vfs_s_write (void *fh, const char *buffer, int count)
 {
     int n;
     struct vfs_class *me = FH_SUPER->me;

+ 1 - 1
vfs/extfs.c

@@ -996,7 +996,7 @@ static int extfs_chmod (struct vfs_class *me, char *path, int mode)
     return 0;
 }
 
-static int extfs_write (void *data, char *buf, int nbyte)
+static int extfs_write (void *data, const char *buf, int nbyte)
 {
     struct pseudofile *file = (struct pseudofile *)data;
 

+ 1 - 1
vfs/local.c

@@ -165,7 +165,7 @@ local_symlink (struct vfs_class *me, char *n1, char *n2)
 }
 
 static int
-local_write (void *data, char *buf, int nbyte)
+local_write (void *data, const char *buf, int nbyte)
 {
     int fd;
     int n;

+ 1 - 1
vfs/mcfs.c

@@ -566,7 +566,7 @@ mcfs_read (void *data, char *buffer, int count)
 }
 
 static int
-mcfs_write (void *data, char *buf, int nbyte)
+mcfs_write (void *data, const char *buf, int nbyte)
 {
     mcfs_handle *info = (mcfs_handle *) data;
     mcfs_connection *mc;

+ 2 - 2
vfs/smbfs.c

@@ -358,14 +358,14 @@ smbfs_read (void *data, char *buffer, int count)
 }
 
 static int
-smbfs_write (void *data, char *buf, int nbyte)
+smbfs_write (void *data, const char *buf, int nbyte)
 {
     smbfs_handle *info = (smbfs_handle *) data;
 	int n;
 
 	DEBUG(3, ("smbfs_write(fnum:%d, nread:%d, nbyte:%d)\n",
 		info->fnum, (int)info->nread, nbyte));
-	n = cli_write(info->cli, info->fnum, 0, buf, info->nread, nbyte);
+	n = cli_write(info->cli, info->fnum, 0, const_cast(char *, buf), info->nread, nbyte);
 	if (n > 0)
 		info->nread += n;
     return n;

+ 1 - 1
vfs/vfs.h

@@ -33,7 +33,7 @@ struct vfs_class {
 		   int mode);
     int (*close) (void *vfs_info);
     int (*read) (void *vfs_info, char *buffer, int count);
-    int (*write) (void *vfs_info, /*FIXME:const*/ char *buf, int count);
+    int (*write) (void *vfs_info, const char *buf, int count);
 
     void *(*opendir) (struct vfs_class *me, const char *dirname);
     void *(*readdir) (void *vfs_info);