diff mbox

[2/2] mini-os: don't get xenbus parameters if xenbus is disabled

Message ID 1472468469-11560-3-git-send-email-jgross@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jürgen Groß Aug. 29, 2016, 11:01 a.m. UTC
get_xenbus() should be called only if CONFIG_XENBUS is set.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 include/xenbus.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Wei Liu Aug. 29, 2016, 11:11 a.m. UTC | #1
On Mon, Aug 29, 2016 at 01:01:09PM +0200, Juergen Gross wrote:
> get_xenbus() should be called only if CONFIG_XENBUS is set.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Samuel Thibault Aug. 29, 2016, 8:42 p.m. UTC | #2
Wei Liu, on Mon 29 Aug 2016 12:11:21 +0100, wrote:
> On Mon, Aug 29, 2016 at 01:01:09PM +0200, Juergen Gross wrote:
> > get_xenbus() should be called only if CONFIG_XENBUS is set.
> > 
> > Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Reviewed-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
diff mbox

Patch

diff --git a/include/xenbus.h b/include/xenbus.h
index 5646a25..c254652 100644
--- a/include/xenbus.h
+++ b/include/xenbus.h
@@ -9,10 +9,14 @@  typedef unsigned long xenbus_transaction_t;
 #ifdef CONFIG_XENBUS
 /* Initialize the XenBus system. */
 void init_xenbus(void);
+void get_xenbus(void *p);
 #else
 static inline void init_xenbus(void)
 {
 }
+static inline void get_xenbus(void *p)
+{
+}
 #endif
 
 /* Read the value associated with a path.  Returns a malloc'd error
@@ -31,7 +35,6 @@  typedef struct xenbus_event *xenbus_event_queue;
 
 extern uint32_t xenbus_evtchn;
 
-void get_xenbus(void *p);
 char *xenbus_watch_path_token(xenbus_transaction_t xbt, const char *path, const char *token, xenbus_event_queue *events);
 char *xenbus_unwatch_path_token(xenbus_transaction_t xbt, const char *path, const char *token);
 extern struct wait_queue_head xenbus_watch_queue;