* [PATCH] move /proc/xen to /proc/sys/xen in xen linux
@ 2005-11-16 15:48 Mike D. Day
0 siblings, 0 replies; 6+ messages in thread
From: Mike D. Day @ 2005-11-16 15:48 UTC (permalink / raw)
To: xen-devel
[-- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] move /proc/xen to /proc/sys/xen in xen linux
@ 2005-11-16 16:53 Ian Pratt
2005-11-16 17:21 ` Hollis Blanchard
0 siblings, 1 reply; 6+ messages in thread
From: Ian Pratt @ 2005-11-16 16:53 UTC (permalink / raw)
To: Mike D. Day, xen-devel
I'd have expected that a patch to move this would have needed to touch
the tools? Maybe they don't use the path directly? The documentation
should probably be updated too, and atleast one of the error printk
paths could do with being updated.
Best,
Ian
> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of
> Mike D. Day
> Sent: 16 November 2005 15:49
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] [PATCH] move /proc/xen to /proc/sys/xen
> in xen linux
>
>
> --
>
> Mike D. Day
> STSM and Architect, Open Virtualization
> IBM Linux Technology Center
> ncmike@us.ibm.com
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] move /proc/xen to /proc/sys/xen in xen linux
2005-11-16 16:53 Ian Pratt
@ 2005-11-16 17:21 ` Hollis Blanchard
0 siblings, 0 replies; 6+ messages in thread
From: Hollis Blanchard @ 2005-11-16 17:21 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Pratt, Mike D. Day
On Wednesday 16 November 2005 10:53, Ian Pratt wrote:
> I'd have expected that a patch to move this would have needed to touch
> the tools? Maybe they don't use the path directly? The documentation
> should probably be updated too, and atleast one of the error printk
> paths could do with being updated.
Why is this on the todo list (http://wiki.xensource.com/xenwiki/XenTodoList)?
AFAIK, /proc/sys is strictly for sysctl settings.
I'll agree that /proc/xen isn't an ideal location, but /proc/sys/xen seems
worse.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] move /proc/xen to /proc/sys/xen in xen linux
@ 2005-11-16 17:29 Ian Pratt
2005-11-16 17:34 ` Hollis Blanchard
0 siblings, 1 reply; 6+ messages in thread
From: Ian Pratt @ 2005-11-16 17:29 UTC (permalink / raw)
To: Hollis Blanchard, xen-devel; +Cc: Mike D. Day
> On Wednesday 16 November 2005 10:53, Ian Pratt wrote:
> > I'd have expected that a patch to move this would have
> needed to touch
> > the tools? Maybe they don't use the path directly? The
> documentation
> > should probably be updated too, and atleast one of the error printk
> > paths could do with being updated.
>
> Why is this on the todo list
> (http://wiki.xensource.com/xenwiki/XenTodoList)?
> AFAIK, /proc/sys is strictly for sysctl settings.
>
> I'll agree that /proc/xen isn't an ideal location, but
> /proc/sys/xen seems worse.
I think the last time this was discussed vi email /sys/xen was the
preferred location, but I don't think there was a lot in it...
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] move /proc/xen to /proc/sys/xen in xen linux
2005-11-16 17:29 [PATCH] move /proc/xen to /proc/sys/xen in xen linux Ian Pratt
@ 2005-11-16 17:34 ` Hollis Blanchard
2005-11-16 20:02 ` Mike D. Day
0 siblings, 1 reply; 6+ messages in thread
From: Hollis Blanchard @ 2005-11-16 17:34 UTC (permalink / raw)
To: Ian Pratt; +Cc: Mike D. Day, xen-devel
On Wednesday 16 November 2005 11:29, Ian Pratt wrote:
> > On Wednesday 16 November 2005 10:53, Ian Pratt wrote:
> > > I'd have expected that a patch to move this would have
> >
> > needed to touch
> >
> > > the tools? Maybe they don't use the path directly? The
> >
> > documentation
> >
> > > should probably be updated too, and atleast one of the error printk
> > > paths could do with being updated.
> >
> > Why is this on the todo list
> > (http://wiki.xensource.com/xenwiki/XenTodoList)?
> > AFAIK, /proc/sys is strictly for sysctl settings.
> >
> > I'll agree that /proc/xen isn't an ideal location, but
> > /proc/sys/xen seems worse.
>
> I think the last time this was discussed vi email /sys/xen was the
> preferred location, but I don't think there was a lot in it...
/sys/xen would be sysfs, which is very different. I agree though: sysfs sounds
more appropriate.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] move /proc/xen to /proc/sys/xen in xen linux
2005-11-16 17:34 ` Hollis Blanchard
@ 2005-11-16 20:02 ` Mike D. Day
0 siblings, 0 replies; 6+ messages in thread
From: Mike D. Day @ 2005-11-16 20:02 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: Ian Pratt, xen-devel
Hollis Blanchard wrote:
>
> /sys/xen would be sysfs, which is very different. I agree though: sysfs sounds
> more appropriate.
I now see that xenbus uses sysfs: /sys/bus/xen[-backend]. I'll rework
the patch to uses sysfs i.e. /sys/xen and roll an additional patch for
the tools.
Mike
--
Mike D. Day
STSM and Architect, Open Virtualization
IBM Linux Technology Center
ncmike@us.ibm.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-11-16 20:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-16 17:29 [PATCH] move /proc/xen to /proc/sys/xen in xen linux Ian Pratt
2005-11-16 17:34 ` Hollis Blanchard
2005-11-16 20:02 ` Mike D. Day
-- strict thread matches above, loose matches on Subject: below --
2005-11-16 16:53 Ian Pratt
2005-11-16 17:21 ` Hollis Blanchard
2005-11-16 15:48 Mike D. Day
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.