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

Re: [Minios-devel] [PATCH 2/2] Save/Restore Support: Replace exit logic for kernel_shutdown logic.



On 21/03/18 19:48, Bruno Alvisio wrote:
> Moved the exit logic to the kernel_shutdown function in shutdown.c
> 
> Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxx>
> ---
>  main.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/main.c b/main.c
> index 4e42f53..513a22d 100644
> --- a/main.c
> +++ b/main.c
> @@ -17,6 +17,7 @@
>  #include <unistd.h>
>  #include <xenbus.h>
>  #include <events.h>
> +#include <shutdown.h>
>  #include <mini-os/lib.h>
>  
>  extern int main(int argc, char *argv[], char *envp[]);
> @@ -177,13 +178,7 @@ void _exit(int ret)
>  #if defined(HAVE_LWIP) && defined(CONFIG_NETFRONT)
>      stop_networking();
>  #endif
> -    stop_kernel();
> -    if (!ret) {
> -     /* No problem, just shutdown.  */
> -        struct sched_shutdown sched_shutdown = { .reason = SHUTDOWN_poweroff 
> };
> -        HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown);
> -    }
> -    do_exit();
> +    kernel_shutdown(ret);

You are assuming that ret is a valid shutdown reason here.

Are you sure this is true?


Juergen

_______________________________________________
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®.