From dc70d154db26813206d527b78931a456877af52f Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Mon, 16 Aug 2004 21:16:54 +0000 Subject: [PATCH] Made the buf argument to vfs->write constant. --- vfs/direntry.c | 2 +- vfs/extfs.c | 2 +- vfs/local.c | 2 +- vfs/mcfs.c | 2 +- vfs/smbfs.c | 4 ++-- vfs/vfs.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vfs/direntry.c b/vfs/direntry.c index 6a9d01af8..c049bdbdb 100644 --- a/vfs/direntry.c +++ b/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; diff --git a/vfs/extfs.c b/vfs/extfs.c index d5f63cf33..cb191f05e 100644 --- a/vfs/extfs.c +++ b/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; diff --git a/vfs/local.c b/vfs/local.c index 241487602..3ca99feee 100644 --- a/vfs/local.c +++ b/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; diff --git a/vfs/mcfs.c b/vfs/mcfs.c index df0c2cde8..130d14adf 100644 --- a/vfs/mcfs.c +++ b/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; diff --git a/vfs/smbfs.c b/vfs/smbfs.c index 7c9c5fa17..a350c7c15 100644 --- a/vfs/smbfs.c +++ b/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; diff --git a/vfs/vfs.h b/vfs/vfs.h index 50005ffb1..2c567cd74 100644 --- a/vfs/vfs.h +++ b/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);