f2fs/sysfs: Introduce a Read-Only attribute macro
Useful when we need to set a node RO to avoid Android over-riding the custom set values. Change-Id: Iad8cf81504d55b8ed75e6b5563f7cf397595ec1a Signed-off-by: Panchajanya1999 <rsk52959@gmail.com> Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
committed by
Pranav Vashi
parent
0019df866f
commit
067be2ed52
@@ -498,6 +498,11 @@ static struct f2fs_attr f2fs_attr_##_name = { \
|
||||
f2fs_sbi_show, f2fs_sbi_store, \
|
||||
offsetof(struct struct_name, elname))
|
||||
|
||||
#define F2FS_RO_ATTR(struct_type, struct_name, name, elname) \
|
||||
F2FS_ATTR_OFFSET(struct_type, name, 0444, \
|
||||
f2fs_sbi_show, f2fs_sbi_store, \
|
||||
offsetof(struct struct_name, elname))
|
||||
|
||||
#define F2FS_GENERAL_RO_ATTR(name) \
|
||||
static struct f2fs_attr f2fs_attr_##name = __ATTR(name, 0444, name##_show, NULL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user