Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto:
>  
> +/* These are ORable flags */

... make them an "enum".

> +const int LOADVM_EXITCODE_QUITLOOP     =  1;
> +const int LOADVM_EXITCODE_QUITPARENT   =  2;

LOADVM_QUIT_ALL, LOADVM_QUIT respectively?

> +const int LOADVM_EXITCODE_KEEPHANDLERS =  4;
> +

Is it more common to drop or keep handlers?

In either case, please add a comment to the three constants that details
how to use them.  In particular, please document why you should drop
(resp. keep) handlers...

Is it by chance that they are only used in savevm.c?  Should they be
moved to a header file?

> 
> +    if (exitcode & LOADVM_EXITCODE_QUITPARENT) {
> +        DPRINTF("loadvm_handlers_state_main: End of loop with QUITPARENT");
> +        exitcode &= ~LOADVM_EXITCODE_QUITPARENT;
> +        exitcode &= LOADVM_EXITCODE_QUITLOOP;

Either you want |=, or the first &= is useless.

Paolo

Reply via email to