From: Hani Benhabiles <kroosec@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, kwolf@redhat.com,
peter.crosthwaite@xilinx.com, armbru@redhat.com,
lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH] qerror: Improve QERR_DEVICE_NOT_ACTIVE message
Date: Tue, 25 Feb 2014 08:10:05 +0100 [thread overview]
Message-ID: <1393312205-7858-1-git-send-email-kroosec@gmail.com> (raw)
The error message as currently used is confusing as there are no "balloon" or
"spice" devices.
(qemu) balloon 1024
balloon: Device 'balloon' has not been activated
With this patch:
(qemu) balloon 1024
balloon: No balloon device has been activated
Signed-off-by: Hani Benhabiles <hani@linux.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
---
include/qapi/qmp/qerror.h | 2 +-
qmp.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
index 73c67b7..25193c9 100644
--- a/include/qapi/qmp/qerror.h
+++ b/include/qapi/qmp/qerror.h
@@ -105,7 +105,7 @@ void qerror_report_err(Error *err);
ERROR_CLASS_GENERIC_ERROR, "Device '%s' does not support hotplugging"
#define QERR_DEVICE_NOT_ACTIVE \
- ERROR_CLASS_DEVICE_NOT_ACTIVE, "Device '%s' has not been activated"
+ ERROR_CLASS_DEVICE_NOT_ACTIVE, "No %s device has been activated"
#define QERR_DEVICE_NOT_ENCRYPTED \
ERROR_CLASS_GENERIC_ERROR, "Device '%s' is not encrypted"
diff --git a/qmp.c b/qmp.c
index d0d98e7..ffddd26 100644
--- a/qmp.c
+++ b/qmp.c
@@ -289,7 +289,6 @@ void qmp_set_password(const char *protocol, const char *password,
if (strcmp(protocol, "spice") == 0) {
if (!using_spice) {
- /* correct one? spice isn't a device ,,, */
error_set(errp, QERR_DEVICE_NOT_ACTIVE, "spice");
return;
}
@@ -337,7 +336,6 @@ void qmp_expire_password(const char *protocol, const char *whenstr,
if (strcmp(protocol, "spice") == 0) {
if (!using_spice) {
- /* correct one? spice isn't a device ,,, */
error_set(errp, QERR_DEVICE_NOT_ACTIVE, "spice");
return;
}
--
1.8.3.2
next reply other threads:[~2014-02-25 7:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 7:10 Hani Benhabiles [this message]
2014-02-25 8:41 ` [Qemu-devel] [PATCH] qerror: Improve QERR_DEVICE_NOT_ACTIVE message Markus Armbruster
2014-02-25 8:42 ` Hani Benhabiles
2014-02-28 18:40 ` Luiz Capitulino
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=1393312205-7858-1-git-send-email-kroosec@gmail.com \
--to=kroosec@gmail.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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).