aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-08-05 03:39:48 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-05 03:39:48 -0700
commit65d33ad6e2e36e893079523114d1d579ad96ab76 (patch)
tree5a843656a575d83306b2a21295eadc968d127e2a /include
parent1cc9f865f84b3beab883ccaeb6a61a65421a97b1 (diff)
downloadhistory-65d33ad6e2e36e893079523114d1d579ad96ab76.tar.gz
[PATCH] simple_read_buffer() helper function
A number of drivers or special virtual devices really just want their "read()" function to populate user space from some internal buffer. This adds such a helper function - "simple_read_from_buffer()" - and converts several ->read() instances to use it. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7f64f2b2cadaee..f8677c13b4a8f1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1527,6 +1527,8 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count);
extern void simple_release_fs(struct vfsmount **mount, int *count);
+extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, void *, size_t);
+
extern int inode_change_ok(struct inode *, struct iattr *);
extern int __must_check inode_setattr(struct inode *, struct iattr *);