qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qmp: return err msg when powerdown a vm when it


From: Qinghua Jin
Subject: Re: [Qemu-devel] [PATCH] qmp: return err msg when powerdown a vm when it isn't in running state
Date: Tue, 22 Dec 2015 07:10:32 +0800 (CST)

Thanks for your help, i'll resubmit the patch right away.

At 2015-12-22 01:55:35, "P J P" <address@hidden> wrote: >+-- On Mon, 21 Dec 2015, Qinghua Jin wrote --+ >| -void qmp_system_powerdown(Error **erp) >| +void qmp_system_powerdown(Error **errp) >| { >| + if (!runstate_is_running()) { >| + error_setg(errp, "Can't powerdown the Virtual Machine when it isn't running"); >| + return; >| + } >| qemu_system_powerdown_request(); >| } > > - Maybe direct call to 'if (!runstate_check(RUN_STATE_RUNNING))' is better? > runstate_is_running too invokes the same. Not sure why are there two > functions 'runstate_is_running' & 'runstate_check'. > - Can't -> Can not > - "...the Virtual Machine.." -> "...virtual machine.." (not capitalised) > - "...when it isn't.." -> "as it is not..." > - OR maybe just say -> "Virtual machine is not running" > >-- >Prasad J Pandit / Red Hat Product Security Team >47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F


 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]