diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-05-04 12:43:36 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-05-04 12:43:36 +1000 |
commit | b6af71fbe4397ddc2d37570adacb8b200b0fbabc (patch) | |
tree | 0a67cd52837891bf4fd27682cc2b6c36286a83c1 /kernel | |
parent | 7f82b64cf694e5d58f2a4b4beab99ec998ef3a53 (diff) | |
parent | a1d9a09ae8003380a7f2297ee4367947cbdf874f (diff) |
Merge remote-tracking branch 'driver-core/driver-core-next'
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/ksysfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 0b624e791805..3b053c04dd86 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c @@ -16,6 +16,7 @@ #include <linux/kexec.h> #include <linux/profile.h> #include <linux/sched.h> +#include <linux/capability.h> #define KERNEL_ATTR_RO(_name) \ static struct kobj_attribute _name##_attr = __ATTR_RO(_name) @@ -131,6 +132,14 @@ KERNEL_ATTR_RO(vmcoreinfo); #endif /* CONFIG_KEXEC */ +/* whether file capabilities are enabled */ +static ssize_t fscaps_show(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) +{ + return sprintf(buf, "%d\n", file_caps_enabled); +} +KERNEL_ATTR_RO(fscaps); + /* * Make /sys/kernel/notes give the raw contents of our kernel .notes section. */ @@ -158,6 +167,7 @@ struct kobject *kernel_kobj; EXPORT_SYMBOL_GPL(kernel_kobj); static struct attribute * kernel_attrs[] = { + &fscaps_attr.attr, #if defined(CONFIG_HOTPLUG) &uevent_seqnum_attr.attr, &uevent_helper_attr.attr, |