summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-03 15:01:11 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-03 15:01:11 +0000
commitf2d8f110db994588cb85a9c0c22c0941f4ccca38 (patch)
treefe7278aeead76aca6d2b98cbd14437e554fd4dd7
parent76aa53bce10ed2b531b07dbf02ffb31c658f5920 (diff)
downloadsamba-f2d8f110db994588cb85a9c0c22c0941f4ccca38.tar.gz
samba-f2d8f110db994588cb85a9c0c22c0941f4ccca38.tar.bz2
samba-f2d8f110db994588cb85a9c0c22c0941f4ccca38.zip
fixed vi on smbwrappper (it was a problem in cli_read())
(This used to be commit 1dcc84b942d4669f978aebdeaf85ea609c2b732f)
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/libsmb/clientgen.c4
-rw-r--r--source3/smbwrapper/README4
-rw-r--r--source3/smbwrapper/smbw.c2
4 files changed, 6 insertions, 8 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 08d4476da9..b246289fd6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -381,8 +381,8 @@ int cli_open(struct cli_state *cli, char *fname, int flags, int share_mode);
BOOL cli_close(struct cli_state *cli, int fnum);
BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout);
BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout);
-int cli_read(struct cli_state *cli, int fnum, char *buf, uint32 offset, uint16 size);
-int cli_write(struct cli_state *cli, int fnum, char *buf, uint32 offset, uint16 size);
+size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
+size_t cli_write(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
BOOL cli_getattrE(struct cli_state *cli, int fd,
int *attr, uint32 *size,
time_t *c_time, time_t *a_time, time_t *m_time);
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index bd044f4e26..6132114ac6 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -1131,7 +1131,7 @@ BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int
/****************************************************************************
read from a file
****************************************************************************/
-int cli_read(struct cli_state *cli, int fnum, char *buf, uint32 offset, uint16 size)
+size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size)
{
char *p;
int total=0;
@@ -1185,7 +1185,7 @@ int cli_read(struct cli_state *cli, int fnum, char *buf, uint32 offset, uint16 s
/****************************************************************************
write to a file
****************************************************************************/
-int cli_write(struct cli_state *cli, int fnum, char *buf, uint32 offset, uint16 size)
+size_t cli_write(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size)
{
char *p;
int total=0;
diff --git a/source3/smbwrapper/README b/source3/smbwrapper/README
index dfea54872e..14e7af700e 100644
--- a/source3/smbwrapper/README
+++ b/source3/smbwrapper/README
@@ -22,14 +22,12 @@ This is code under development. Lots of things don't work yet.
Things that I have tried and do seem to work include:
emacs, tar, ls, cmp, cp, rsync, du, cat, rm, mv, less, more, wc, head,
- tail, bash, tcsh, mkdir, rmdir
+ tail, bash, tcsh, mkdir, rmdir, vim, xedit
things that I know don't work:
- vi (I don't know why this is)
anything executing from the share
anything that uses mmap
-
If you want to help with the development of this code then join the
samba-technical mailing list.
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c
index d6964790d6..799a7f02cc 100644
--- a/source3/smbwrapper/smbw.c
+++ b/source3/smbwrapper/smbw.c
@@ -909,7 +909,7 @@ ssize_t smbw_read(int fd, void *buf, size_t count)
struct smbw_file *file;
int ret;
- DEBUG(4,("%s\n", __FUNCTION__));
+ DEBUG(4,("%s %d\n", __FUNCTION__, (int)count));
smbw_busy++;