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

[Minios-devel] [PATCH v2 1/2] Save/Restore Support: Move location of CONFIG_XENBUS macro to include appropiate variables and functions.



init_shutdown and fini_shutdown functions should only be implemented if
CONFIG_XENBUS is defined.

Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 shutdown.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/shutdown.c b/shutdown.c
index cd91d07..510f6e1 100644
--- a/shutdown.c
+++ b/shutdown.c
@@ -48,12 +48,12 @@
 
 static start_info_t *start_info_ptr;
 
+#ifdef CONFIG_XENBUS
 static const char *path = "control/shutdown";
 static const char *token = "control/shutdown";
 static xenbus_event_queue events = NULL;
 static int end_shutdown_thread = 0;
 
-#ifdef CONFIG_XENBUS
 /* This should be overridden by the application we are linked against. */
 __attribute__((weak)) void app_shutdown(unsigned reason)
 {
@@ -110,7 +110,6 @@ static void shutdown_thread(void *p)
         app_shutdown(shutdown_reason);
     }
 }
-#endif
 
 static void fini_shutdown(void)
 {
@@ -132,6 +131,7 @@ void init_shutdown(start_info_t *si)
     end_shutdown_thread = 0;
     create_thread("shutdown", shutdown_thread, NULL);
 }
+#endif
 
 void kernel_shutdown(int reason)
 {
@@ -154,7 +154,9 @@ void kernel_shutdown(int reason)
 
     printk("MiniOS will shutdown (reason = %s) ...\n", reason_str);
 
+#ifdef CONFIG_XENBUS
     fini_shutdown();
+#endif
 
     stop_kernel();
 
-- 
2.3.2 (Apple Git-55)


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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