move /proc/xen to /proc/sys/xen in xen linux
PATCH 1/1 move /proc/xen to /proc/sys/xen in xen linux
Signature · 6 lines
-- Mike D. Day STSM and Architect, Open Virtualization IBM Linux Technology Center [email protected]
# HG changeset patch
# User [email protected]
# Node ID 133b58ab5a8ff2a5b00a342de402588d0e2fd36b # Parent 9bf6f907b3ff0261902f06d261f76c1bd12af9f5 Move /proc/xen to /proc/sys/xen
Signed-off-by Mike Day <[email protected]>
linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c +1 -1
@@ -442,7 +442,7 @@* /proc/xen/grant : used by libxc to access grant tables */ if ((grant_pde =create_xen_proc_entry ("grant" ,0600 )) ==NULL ) { -WPRINTK ("Unable to create grant xen proc entry\n" ); +WPRINTK ("Unable to create /proc/sys/xen/grant_pde.\n" );return -1 ; }
linux-2.6-xen-sparse/arch/xen/kernel/xen_proc.c +2 -1
@@ -8,8 +8,9 @@struct proc_dir_entry *create_xen_proc_entry (const char *name,mode_t mode) {if ( xen_base ==NULL ) -if ( (xen_base =proc_mkdir ("xen" , &proc_root)) ==NULL ) +if ( (xen_base =proc_mkdir ("sys/xen" ,NULL )) ==NULL ) {panic ("Couldn't create /proc/xen" ); + }return create_proc_entry (name, mode, xen_base); }
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +1 -1
@@ -470,7 +470,7 @@ balloon_timer.function = balloon_alarm;if ((balloon_pde =create_xen_proc_entry ("balloon" ,0644 )) ==NULL ) { -WPRINTK ("Unable to create /proc/xen/balloon.\n" ); +WPRINTK ("Unable to create /proc/sys/xen/balloon.\n" );return -1 ; }
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +7 -4
@@ -38,6 +38,8 @@#endif static struct proc_dir_entry *privcmd_intf; +#define WPRINTK(fmt, args...) \ + printk(KERN_WARNING "xen_privcmd: " fmt, ##args)static int privcmd_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsigned long data)
@@ -254,10 +256,11 @@static int __init privcmd_init (void ) { - privcmd_intf =create_xen_proc_entry ("privcmd" ,0400 ); -if (privcmd_intf !=NULL ) - privcmd_intf->proc_fops = &privcmd_file_ops; - +if ((privcmd_intf =create_xen_proc_entry ("privcmd" ,0400 )) ==NULL ) { +WPRINTK ("Unable to create /proc/sys/xen/privcmd.\n" ); +return -1 ; + } + privcmd_intf->proc_fops = &privcmd_file_ops;return 0 ; }
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c +8 -4
@@ -44,6 +44,9 @@#include <asm-xen/xenbus.h> #include <asm-xen/xen_proc.h> #include <asm/hypervisor.h> + +#define WPRINTK(fmt, args...) \ + printk(KERN_WARNING "xenbus: " fmt, ##args)struct xenbus_dev_transaction {struct list_head list;
@@ -221,10 +224,11 @@static int __init xenbus_dev_init (void ) { - xenbus_dev_intf =create_xen_proc_entry ("xenbus" ,0400 ); -if (xenbus_dev_intf) - xenbus_dev_intf->proc_fops = &xenbus_dev_file_ops; - +if ((xenbus_dev_intf =create_xen_proc_entry ("xenbus" ,0400 )) ==NULL ) { +WPRINTK ("Unable to create /proc/sys/xen/xenbus.\n" ); +return -1 ; + } + xenbus_dev_intf->proc_fops = &xenbus_dev_file_ops;return 0 ; }
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +13 -4
@@ -58,6 +58,8 @@extern struct semaphore xenwatch_mutex;#define streq (a, b) (strcmp((a), (b)) == 0) +#define WPRINTK(fmt, args...) \ + printk(KERN_WARNING "xenbus_probe: " fmt, ##args)static struct notifier_block *xenstore_chain;
@@ -964,10 +966,17 @@ xen_start_info->store_evtchn = op.u.alloc_unbound.port;/* And finally publish the above info in /proc/xen */ -if ((xsd_mfn_intf =create_xen_proc_entry ("xsd_mfn" ,0400 ))) - xsd_mfn_intf->read_proc = xsd_mfn_read; -if ((xsd_port_intf =create_xen_proc_entry ("xsd_port" ,0400 ))) - xsd_port_intf->read_proc = xsd_port_read; +if ((xsd_mfn_intf =create_xen_proc_entry ("xsd_mfn" ,0400 )) ==NULL ) { +WPRINTK ("Unable to create /proc/sys/xen/xsd_mfn.\n" ); +return -1 ; + } + xsd_mfn_intf->read_proc = xsd_mfn_read; + +if ((xsd_port_intf =create_xen_proc_entry ("xsd_port" ,0400 )) ==NULL ) { +WPRINTK ("Unable to create /proc/sys/xen/xsd_port.\n" ); +return -1 ; + } + xsd_port_intf->read_proc = xsd_port_read; }/* Initialize the interface to xenstore. */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel