WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1/4] balloon: the balloon driver's proc entry needs C

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1/4] balloon: the balloon driver's proc entry needs CONFIG_PROC_FS
From: Horms <horms@xxxxxxxxxxxx>
Date: Fri, 16 Jun 2006 16:50:57 +0900
Cc: Horms <horms@xxxxxxxxxxxx>
Delivery-date: Fri, 16 Jun 2006 02:01:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060616075052.31276.7750.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060616075052.31276.7750.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
balloon: the balloon driver's proc entry needs CONFIG_PROC_FS

CONFIG_PROC_FS is needed in order to compile the proc entry portion
of the baloon driver. I believe that the rest of the driver is still
fully functional with this change.

Signed-Off-By: Horms <horms@xxxxxxxxxxxx>

 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- x/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
+++ x/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
@@ -58,7 +58,9 @@
 
 #define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10))
 
+#ifdef CONFIG_PROC_FS
 static struct proc_dir_entry *balloon_pde;
+#endif
 
 static DECLARE_MUTEX(balloon_mutex);
 
@@ -403,6 +405,7 @@ static int balloon_init_watcher(struct n
        return NOTIFY_DONE;
 }
 
+#ifdef CONFIG_PROC_FS
 static int balloon_write(struct file *file, const char __user *buffer,
                         unsigned long count, void *data)
 {
@@ -456,6 +459,7 @@ static int balloon_read(char *page, char
        *eof = 1;
        return len;
 }
+#endif
 
 static struct notifier_block xenstore_notifier;
 
@@ -481,6 +485,7 @@ static int __init balloon_init(void)
        balloon_timer.data = 0;
        balloon_timer.function = balloon_alarm;
     
+#ifdef CONFIG_PROC_FS
        if ((balloon_pde = create_xen_proc_entry("balloon", 0644)) == NULL) {
                WPRINTK("Unable to create /proc/xen/balloon.\n");
                return -1;
@@ -488,6 +493,7 @@ static int __init balloon_init(void)
 
        balloon_pde->read_proc  = balloon_read;
        balloon_pde->write_proc = balloon_write;
+#endif
     
        /* Initialise the balloon with excess memory space. */
        for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {

-- 
Horms                                           http://www.vergenet.net/~horms/


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