ia64/linux-2.6.18-xen.hg

changeset 577:b5ca56b48581

xen sysfs: Fix build when kexec support is not configured.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jun 17 10:32:02 2008 +0100 (2008-06-17)
parents 4b600eae1fb7
children 5201a184f513
files drivers/xen/core/xen_sysfs.c
line diff
     1.1 --- a/drivers/xen/core/xen_sysfs.c	Tue Jun 17 09:37:36 2008 +0100
     1.2 +++ b/drivers/xen/core/xen_sysfs.c	Tue Jun 17 10:32:02 2008 +0100
     1.3 @@ -335,6 +335,8 @@ static void xen_properties_destroy(void)
     1.4  			   &xen_properties_group);
     1.5  }
     1.6  
     1.7 +#ifdef CONFIG_KEXEC
     1.8 +
     1.9  static ssize_t vmcoreinfo_show(struct hyp_sysfs_attr *attr, char *page)
    1.10  {
    1.11  	return sprintf(page, "%lx %zx\n",
    1.12 @@ -345,7 +347,8 @@ HYPERVISOR_ATTR_RO(vmcoreinfo);
    1.13  
    1.14  static int __init xen_sysfs_vmcoreinfo_init(void)
    1.15  {
    1.16 -	return sysfs_create_file(&hypervisor_subsys.kset.kobj, &vmcoreinfo_attr.attr);
    1.17 +	return sysfs_create_file(&hypervisor_subsys.kset.kobj,
    1.18 +				 &vmcoreinfo_attr.attr);
    1.19  }
    1.20  
    1.21  static void xen_sysfs_vmcoreinfo_destroy(void)
    1.22 @@ -353,6 +356,13 @@ static void xen_sysfs_vmcoreinfo_destroy
    1.23  	sysfs_remove_file(&hypervisor_subsys.kset.kobj, &vmcoreinfo_attr.attr);
    1.24  }
    1.25  
    1.26 +#else
    1.27 +
    1.28 +#define xen_sysfs_vmcoreinfo_init()	0
    1.29 +#define xen_sysfs_vmcoreinfo_destroy()	((void)0)
    1.30 +
    1.31 +#endif
    1.32 +
    1.33  static int __init hyper_sysfs_init(void)
    1.34  {
    1.35  	int ret;