diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-13 21:36:17 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-17 12:04:42 -0400 |
commit | 0fc9655ec67ec5d4dfd08e469e0e9f0a494bf5bc (patch) | |
tree | fc67e000acb43601a0dcb9c0288a94a3d737b6a2 /include/net | |
parent | 95820a36516d12dcb49d066dd3d5b187a2557612 (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.h | 10 |
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); |
202 | int p9_client_clunk(struct p9_fid *fid); | 202 | int p9_client_clunk(struct p9_fid *fid); |
203 | int p9_client_remove(struct p9_fid *fid); | 203 | int p9_client_remove(struct p9_fid *fid); |
204 | int p9_client_read(struct p9_fid *fid, char *data, u64 offset, u32 count); | 204 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
205 | u64 offset, u32 count); | ||
205 | int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count); | 206 | int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count); |
206 | int p9_client_write(struct p9_fid *fid, char *data, u64 offset, u32 count); | 207 | int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata, |
207 | int p9_client_uread(struct p9_fid *fid, char __user *data, u64 offset, | 208 | u64 offset, u32 count); |
208 | u32 count); | ||
209 | int p9_client_uwrite(struct p9_fid *fid, const char __user *data, u64 offset, | ||
210 | u32 count); | ||
211 | struct p9_stat *p9_client_stat(struct p9_fid *fid); | 209 | struct p9_stat *p9_client_stat(struct p9_fid *fid); |
212 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); | 210 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); |
213 | struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); | 211 | struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); |