All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mike D. Day" <ncmike@us.ibm.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] move /proc/xen to /proc/sys/xen in xen linux
Date: Wed, 16 Nov 2005 10:48:31 -0500	[thread overview]
Message-ID: <437B54CF.3010807@us.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 104 bytes --]


-- 

Mike D. Day
STSM and Architect, Open Virtualization
IBM Linux Technology Center
ncmike@us.ibm.com

[-- Attachment #2: proc_xen.diff --]
[-- Type: text/plain, Size: 5075 bytes --]

# HG changeset patch
# User mdday@aksrc.raleigh.ibm.com
# Node ID 133b58ab5a8ff2a5b00a342de402588d0e2fd36b
# Parent  9bf6f907b3ff0261902f06d261f76c1bd12af9f5
Move /proc/xen to /proc/sys/xen

signed-off-by: Mike Day <ncmike@us.ibm.com>

diff -r 9bf6f907b3ff -r 133b58ab5a8f linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c	Wed Nov 16 10:29:52 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c	Wed Nov 16 15:34:49 2005
@@ -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;
 	}
 
diff -r 9bf6f907b3ff -r 133b58ab5a8f linux-2.6-xen-sparse/arch/xen/kernel/xen_proc.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/xen_proc.c	Wed Nov 16 10:29:52 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/xen_proc.c	Wed Nov 16 15:34:49 2005
@@ -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);
 }
 
diff -r 9bf6f907b3ff -r 133b58ab5a8f linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Nov 16 10:29:52 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Nov 16 15:34:49 2005
@@ -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;
 	}
 
diff -r 9bf6f907b3ff -r 133b58ab5a8f linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Wed Nov 16 10:29:52 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Wed Nov 16 15:34:49 2005
@@ -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;
 }
 
diff -r 9bf6f907b3ff -r 133b58ab5a8f linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c	Wed Nov 16 10:29:52 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c	Wed Nov 16 15:34:49 2005
@@ -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;
 }
 
diff -r 9bf6f907b3ff -r 133b58ab5a8f linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Nov 16 10:29:52 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Nov 16 15:34:49 2005
@@ -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. */

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2005-11-16 15:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 15:48 Mike D. Day [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-16 16:53 [PATCH] move /proc/xen to /proc/sys/xen in xen linux Ian Pratt
2005-11-16 17:21 ` Hollis Blanchard
2005-11-16 17:29 Ian Pratt
2005-11-16 17:34 ` Hollis Blanchard
2005-11-16 20:02   ` Mike D. Day

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=437B54CF.3010807@us.ibm.com \
    --to=ncmike@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.