Made the buf argument to vfs->write constant.

This commit is contained in:
Roland Illig 2004-08-16 21:16:54 +00:00
parent 789e5e9bcb
commit dc70d154db
6 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);