diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-06-30 02:17:28 (GMT) |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-07-09 00:13:40 (GMT) |
commit | 23d893f51cde7013e4c29094da2237cce4f20035 (patch) | |
tree | 8501d50703820178ede0ea6a96796589c2464c5d /arch/powerpc/platforms/cell/spufs/spufs.h | |
parent | 87ff6090bfe416c71730654ab53cd4ecffdd675e (diff) | |
download | linux-fsl-qoriq-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.h | 11 |
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 433dece..4136054 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; |