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

[Xen-changelog] [mini-os master] Save/Restore Support: Move location of CONFIG_XENBUS macro to include appropiate variables and functions.



commit 36feb1e548cdc892dc6835367702b49100a842a4
Author:     Bruno Alvisio <bruno.alvisio@xxxxxxxxx>
AuthorDate: Fri Mar 23 10:47:52 2018 -0700
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Mar 27 12:23:30 2018 +0100

    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();
 
--
generated by git-patchbot for /home/xen/git/mini-os.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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