diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-03-20 21:47:52 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-22 16:16:31 -0400 |
commit | 0f4238958d28044b335644b69df6071cdb04b5ce (patch) | |
tree | 159b82f8eb9479cdc10f861d682309b4c0c8c411 /fs/sysfs/sysfs.h | |
parent | bbd1ae412c9eb09ae7bb11cfaf7018a2367d493f (diff) |
[SCSI] sysfs: make group is_valid return a mode_t
We have a problem in scsi_transport_spi in that we need to customise
not only the visibility of the attributes, but also their mode. Fix
this by making the is_visible() callback return a mode, with 0
indicating is not visible.
Also add a sysfs_update_group() API to allow us to change either the
visibility or mode of the files at any time on the fly.
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index ff17f8da9b43..ce4e15f8aaeb 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -154,6 +154,8 @@ extern const struct file_operations sysfs_file_operations; | |||
154 | int sysfs_add_file(struct sysfs_dirent *dir_sd, | 154 | int sysfs_add_file(struct sysfs_dirent *dir_sd, |
155 | const struct attribute *attr, int type); | 155 | const struct attribute *attr, int type); |
156 | 156 | ||
157 | int sysfs_add_file_mode(struct sysfs_dirent *dir_sd, | ||
158 | const struct attribute *attr, int type, mode_t amode); | ||
157 | /* | 159 | /* |
158 | * bin.c | 160 | * bin.c |
159 | */ | 161 | */ |