summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-10-01 17:42:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 17:27:40 -0700
commitf9b9a6217cf10fd5d3002627cc13c4789a777213 (patch)
tree7c253a5ad2a30364ab6696f6b32c3119dd7cd515 /fs/sysfs/sysfs.h
parent3ff65d3cb09ee642363bcaf12c6c38670263d93a (diff)
downloadlinux-f9b9a6217cf10fd5d3002627cc13c4789a777213.tar.gz
linux-f9b9a6217cf10fd5d3002627cc13c4789a777213.tar.bz2
linux-f9b9a6217cf10fd5d3002627cc13c4789a777213.zip
sysfs: prepare path write for unified regular / bin file handling
sysfs bin file handling will be merged into the regular file support. This patch prepares the write path. bin file write is almost identical to regular file write except that the write length is capped by the inode size and @off is passed to the write method. This patch adds bin file handling to sysfs_write_file() so that it can handle both regular and bin files. A new file_operations struct sysfs_bin_operations is added, which currently only hosts sysfs_write_file() and generic_file_llseek(). This isn't used yet but will eventually replace fs/sysfs/bin.c. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 4b1d8258b071..f103bac53df7 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -212,6 +212,7 @@ int sysfs_inode_init(void);
* file.c
*/
extern const struct file_operations sysfs_file_operations;
+extern const struct file_operations sysfs_bin_operations;
int sysfs_add_file(struct sysfs_dirent *dir_sd,
const struct attribute *attr, int type);