direct-io.hg

changeset 13799:1e56ac73b9b9

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@novell.com>
author kfraser@localhost.localdomain
date Fri Feb 02 16:04:11 2007 +0000 (2007-02-02)
parents 2d930873f56d
children 01ec7dba9ff8
files linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c linux-2.6-xen-sparse/include/xen/xenbus.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c	Fri Feb 02 15:55:56 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c	Fri Feb 02 16:04:11 2007 +0000
     1.3 @@ -42,9 +42,9 @@
     1.4  #define DPRINTK(fmt, args...) \
     1.5      pr_debug("xenbus_client (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args)
     1.6  
     1.7 -char *xenbus_strstate(enum xenbus_state state)
     1.8 +const char *xenbus_strstate(enum xenbus_state state)
     1.9  {
    1.10 -	static char *name[] = {
    1.11 +	static const char *const name[] = {
    1.12  		[ XenbusStateUnknown      ] = "Unknown",
    1.13  		[ XenbusStateInitialising ] = "Initialising",
    1.14  		[ XenbusStateInitWait     ] = "InitWait",
    1.15 @@ -55,6 +55,7 @@ char *xenbus_strstate(enum xenbus_state 
    1.16  	};
    1.17  	return (state < ARRAY_SIZE(name)) ? name[state] : "INVALID";
    1.18  }
    1.19 +EXPORT_SYMBOL_GPL(xenbus_strstate);
    1.20  
    1.21  int xenbus_watch_path(struct xenbus_device *dev, const char *path,
    1.22  		      struct xenbus_watch *watch,
     2.1 --- a/linux-2.6-xen-sparse/include/xen/xenbus.h	Fri Feb 02 15:55:56 2007 +0000
     2.2 +++ b/linux-2.6-xen-sparse/include/xen/xenbus.h	Fri Feb 02 16:04:11 2007 +0000
     2.3 @@ -295,7 +295,7 @@ void xenbus_dev_fatal(struct xenbus_devi
     2.4  
     2.5  int __init xenbus_dev_init(void);
     2.6  
     2.7 -char *xenbus_strstate(enum xenbus_state state);
     2.8 +const char *xenbus_strstate(enum xenbus_state state);
     2.9  int xenbus_dev_is_online(struct xenbus_device *dev);
    2.10  int xenbus_frontend_closed(struct xenbus_device *dev);
    2.11