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-changelog

[Xen-changelog] [xen-unstable] linux: Allow xenbus_strstate() to be used

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] linux: Allow xenbus_strstate() to be used from modules.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Feb 2007 10:45:12 -0800
Delivery-date: Fri, 02 Feb 2007 10:45:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1170432251 0
# Node ID 1e56ac73b9b9d2a23d8d9b7b3382c372b38bc7b8
# Parent  2d930873f56dffacf5212cbeee7ba77b4ef5265f
linux: Allow xenbus_strstate() to be used from modules.

The function is referenced by a number of DPRINTK()-s. Also, properly
const-ify it.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c |    7 ++++---
 linux-2.6-xen-sparse/include/xen/xenbus.h               |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff -r 2d930873f56d -r 1e56ac73b9b9 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c   Fri Feb 02 
15:55:56 2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c   Fri Feb 02 
16:04:11 2007 +0000
@@ -42,9 +42,9 @@
 #define DPRINTK(fmt, args...) \
     pr_debug("xenbus_client (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, 
##args)
 
-char *xenbus_strstate(enum xenbus_state state)
-{
-       static char *name[] = {
+const char *xenbus_strstate(enum xenbus_state state)
+{
+       static const char *const name[] = {
                [ XenbusStateUnknown      ] = "Unknown",
                [ XenbusStateInitialising ] = "Initialising",
                [ XenbusStateInitWait     ] = "InitWait",
@@ -55,6 +55,7 @@ char *xenbus_strstate(enum xenbus_state 
        };
        return (state < ARRAY_SIZE(name)) ? name[state] : "INVALID";
 }
+EXPORT_SYMBOL_GPL(xenbus_strstate);
 
 int xenbus_watch_path(struct xenbus_device *dev, const char *path,
                      struct xenbus_watch *watch,
diff -r 2d930873f56d -r 1e56ac73b9b9 linux-2.6-xen-sparse/include/xen/xenbus.h
--- a/linux-2.6-xen-sparse/include/xen/xenbus.h Fri Feb 02 15:55:56 2007 +0000
+++ b/linux-2.6-xen-sparse/include/xen/xenbus.h Fri Feb 02 16:04:11 2007 +0000
@@ -295,7 +295,7 @@ void xenbus_dev_fatal(struct xenbus_devi
 
 int __init xenbus_dev_init(void);
 
-char *xenbus_strstate(enum xenbus_state state);
+const char *xenbus_strstate(enum xenbus_state state);
 int xenbus_dev_is_online(struct xenbus_device *dev);
 int xenbus_frontend_closed(struct xenbus_device *dev);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] linux: Allow xenbus_strstate() to be used from modules., Xen patchbot-unstable <=