config XEN_SYSFS
tristate "Export Xen attributes in sysfs"
depends on SYSFS
+ select SYS_HYPERVISOR
default y
help
Xen hypervisor attributes will show up under /sys/hypervisor/.
obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o
obj-$(CONFIG_PROC_FS) += xen_proc.o
-obj-$(CONFIG_SYSFS) += hypervisor_sysfs.o
+obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor_sysfs.o
obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o
obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o
obj-$(CONFIG_XEN_SMPBOOT) += smpboot.o
#include <linux/kobject.h>
#include <xen/hypervisor_sysfs.h>
-decl_subsys(hypervisor, NULL, NULL);
-
static ssize_t hyp_sysfs_show(struct kobject *kobj,
struct attribute *attr,
char *buffer)
return 0;
}
-struct sysfs_ops hyp_sysfs_ops = {
+static struct sysfs_ops hyp_sysfs_ops = {
.show = hyp_sysfs_show,
.store = hyp_sysfs_store,
};
return -ENODEV;
hypervisor_subsys.kset.kobj.ktype = &hyp_sysfs_kobj_type;
- return subsystem_register(&hypervisor_subsys);
+ return 0;
}
device_initcall(hypervisor_subsys_init);
-EXPORT_SYMBOL_GPL(hypervisor_subsys);
static struct hyp_sysfs_attr _name##_attr = \
__ATTR(_name, 0644, _name##_show, _name##_store)
-extern struct subsystem hypervisor_subsys;
-
struct hyp_sysfs_attr {
struct attribute attr;
ssize_t (*show)(struct hyp_sysfs_attr *, char *);