[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.