From: P J P <ppandit@redhat.com>
To: Qinghua Jin <qhjin_dev@163.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qmp: return err msg when powerdown a vm when it isn't in running state
Date: Mon, 21 Dec 2015 23:25:35 +0530 (IST) [thread overview]
Message-ID: <alpine.LFD.2.20.1512212301240.26574@wniryva> (raw)
In-Reply-To: <1450710967-24399-1-git-send-email-qhjin_dev@163.com>
+-- 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
next prev parent reply other threads:[~2015-12-21 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-21 15:16 [Qemu-devel] [PATCH] qmp: return err msg when powerdown a vm when it isn't in running state Qinghua Jin
2015-12-21 17:55 ` P J P [this message]
2015-12-21 23:10 ` Qinghua Jin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.20.1512212301240.26574@wniryva \
--to=ppandit@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qhjin_dev@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).