summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/spufs.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-06-30 06:17:28 +0400
committerJeremy Kerr <jk@ozlabs.org>2008-07-09 04:13:40 +0400
commit23d893f51cde7013e4c29094da2237cce4f20035 (patch)
tree8501d50703820178ede0ea6a96796589c2464c5d /arch/powerpc/platforms/cell/spufs/spufs.h
parent87ff6090bfe416c71730654ab53cd4ecffdd675e (diff)
downloadlinux-23d893f51cde7013e4c29094da2237cce4f20035.tar.xz
powerpc/spufs: allow spufs files to specify sizes
Currently, spufs never specifies the i_size for the files in context directories, so stat() always reports 0-byte files. This change adds allows the spufs_dir_(nosched_)contents arrays to specify a file size. This allows stat() to report correct file sizes, and makes SEEK_END work. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/spufs.h')
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 433dece5c823..413605406bda 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -235,8 +235,15 @@ struct spufs_inode_info {
#define SPUFS_I(inode) \
container_of(inode, struct spufs_inode_info, vfs_inode)
-extern struct tree_descr spufs_dir_contents[];
-extern struct tree_descr spufs_dir_nosched_contents[];
+struct spufs_tree_descr {
+ const char *name;
+ const struct file_operations *ops;
+ int mode;
+ size_t size;
+};
+
+extern struct spufs_tree_descr spufs_dir_contents[];
+extern struct spufs_tree_descr spufs_dir_nosched_contents[];
/* system call implementation */
extern struct spufs_calls spufs_calls;