aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2008-10-13 21:36:17 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2008-10-17 12:04:42 -0400
commit0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc (patch)
treefc67e000acb43601a0dcb9c0288a94a3d737b6a2 /include/net
parent95820a36516d12dcb49d066dd3d5b187a2557612 (diff)
9p: consolidate read/write functions
Currently there are two separate versions of read and write. One for dealing with user buffers and the other for dealing with kernel buffers. There is a tremendous amount of code duplication in the otherwise identical versions of these functions. This patch adds an additional user buffer parameter to read and write and conditionalizes handling of the buffer on whether the kernel buffer or the user buffer is populated. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/9p/client.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index 6a71d9067818..c70a0f0b448d 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -201,13 +201,11 @@ int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode,
201 char *extension); 201 char *extension);
202int p9_client_clunk(struct p9_fid *fid); 202int p9_client_clunk(struct p9_fid *fid);
203int p9_client_remove(struct p9_fid *fid); 203int p9_client_remove(struct p9_fid *fid);
204int p9_client_read(struct p9_fid *fid, char *data, u64 offset, u32 count); 204int p9_client_read(struct p9_fid *fid, char *data, char __user *udata,
205 u64 offset, u32 count);
205int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count); 206int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count);
206int p9_client_write(struct p9_fid *fid, char *data, u64 offset, u32 count); 207int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata,
207int p9_client_uread(struct p9_fid *fid, char __user *data, u64 offset, 208 u64 offset, u32 count);
208 u32 count);
209int p9_client_uwrite(struct p9_fid *fid, const char __user *data, u64 offset,
210 u32 count);
211struct p9_stat *p9_client_stat(struct p9_fid *fid); 209struct p9_stat *p9_client_stat(struct p9_fid *fid);
212int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); 210int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst);
213struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); 211struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset);