From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: qemu-trivial@nongnu.org
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
armbru@redhat.com, mjt@tls.msk.ru, qemu-devel@nongnu.org,
peter.huangpeng@huawei.com, kraxel@redhat.com
Subject: [Qemu-devel] [PATCH v3 3/5] qemu-char: fix incorrect state in error message
Date: Tue, 4 Nov 2014 18:50:21 +0800 [thread overview]
Message-ID: <1415098223-32404-4-git-send-email-zhang.zhanghailiang@huawei.com> (raw)
In-Reply-To: <1415098223-32404-1-git-send-email-zhang.zhanghailiang@huawei.com>
It is either "Failed _to_ do something", or "something failed",
but not "failed something".
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
---
qemu-char.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index a09bbf6..0f38cdd 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1872,25 +1872,25 @@ static int win_chr_init(CharDriverState *chr, const char *filename)
s->hsend = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!s->hsend) {
- fprintf(stderr, "Failed CreateEvent\n");
+ fprintf(stderr, "CreateEvent failed\n");
goto fail;
}
s->hrecv = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!s->hrecv) {
- fprintf(stderr, "Failed CreateEvent\n");
+ fprintf(stderr, "CreateEvent failed\n");
goto fail;
}
s->hcom = CreateFile(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
if (s->hcom == INVALID_HANDLE_VALUE) {
- fprintf(stderr, "Failed CreateFile (%lu)\n", GetLastError());
+ fprintf(stderr, "CreateFile (%lu) failed\n", GetLastError());
s->hcom = NULL;
goto fail;
}
if (!SetupComm(s->hcom, NRECVBUF, NSENDBUF)) {
- fprintf(stderr, "Failed SetupComm\n");
+ fprintf(stderr, "SetupComm failed\n");
goto fail;
}
@@ -1901,23 +1901,23 @@ static int win_chr_init(CharDriverState *chr, const char *filename)
CommConfigDialog(filename, NULL, &comcfg);
if (!SetCommState(s->hcom, &comcfg.dcb)) {
- fprintf(stderr, "Failed SetCommState\n");
+ fprintf(stderr, "SetCommState failed\n");
goto fail;
}
if (!SetCommMask(s->hcom, EV_ERR)) {
- fprintf(stderr, "Failed SetCommMask\n");
+ fprintf(stderr, "SetCommMask failed\n");
goto fail;
}
cto.ReadIntervalTimeout = MAXDWORD;
if (!SetCommTimeouts(s->hcom, &cto)) {
- fprintf(stderr, "Failed SetCommTimeouts\n");
+ fprintf(stderr, "SetCommTimeouts failed\n");
goto fail;
}
if (!ClearCommError(s->hcom, &err, &comstat)) {
- fprintf(stderr, "Failed ClearCommError\n");
+ fprintf(stderr, "ClearCommError failed\n");
goto fail;
}
qemu_add_polling_cb(win_chr_poll, chr);
@@ -2069,12 +2069,12 @@ static int win_chr_pipe_init(CharDriverState *chr, const char *filename)
s->hsend = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!s->hsend) {
- fprintf(stderr, "Failed CreateEvent\n");
+ fprintf(stderr, "CreateEvent failed\n");
goto fail;
}
s->hrecv = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!s->hrecv) {
- fprintf(stderr, "Failed CreateEvent\n");
+ fprintf(stderr, "CreateEvent failed\n");
goto fail;
}
@@ -2084,7 +2084,7 @@ static int win_chr_pipe_init(CharDriverState *chr, const char *filename)
PIPE_WAIT,
MAXCONNECT, NSENDBUF, NRECVBUF, NTIMEOUT, NULL);
if (s->hcom == INVALID_HANDLE_VALUE) {
- fprintf(stderr, "Failed CreateNamedPipe (%lu)\n", GetLastError());
+ fprintf(stderr, "CreateNamedPipe (%lu) failed\n", GetLastError());
s->hcom = NULL;
goto fail;
}
@@ -2093,13 +2093,13 @@ static int win_chr_pipe_init(CharDriverState *chr, const char *filename)
ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
ret = ConnectNamedPipe(s->hcom, &ov);
if (ret) {
- fprintf(stderr, "Failed ConnectNamedPipe\n");
+ fprintf(stderr, "ConnectNamedPipe failed\n");
goto fail;
}
ret = GetOverlappedResult(s->hcom, &ov, &size, TRUE);
if (!ret) {
- fprintf(stderr, "Failed GetOverlappedResult\n");
+ fprintf(stderr, "GetOverlappedResult failed\n");
if (ov.hEvent) {
CloseHandle(ov.hEvent);
ov.hEvent = NULL;
--
1.7.12.4
next prev parent reply other threads:[~2014-11-04 10:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 10:50 [Qemu-devel] [PATCH v3 0/5] Trivial patch about qemu-char zhanghailiang
2014-11-04 10:50 ` [Qemu-devel] [PATCH v3 1/5] qemu-char: fix parameter check in some qemu_chr_parse_* functions zhanghailiang
2014-11-04 13:25 ` Alex Bennée
2014-11-05 7:05 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-11-05 12:19 ` zhanghailiang
2014-11-05 13:28 ` Alex Bennée
2014-11-04 10:50 ` [Qemu-devel] [PATCH v3 2/5] spice-qemu-char: fix parameter checks in " zhanghailiang
2014-11-04 13:27 ` Alex Bennée
2014-11-04 10:50 ` zhanghailiang [this message]
2014-11-04 13:31 ` [Qemu-devel] [PATCH v3 3/5] qemu-char: fix incorrect state in error message Alex Bennée
2014-11-05 7:08 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-11-04 10:50 ` [Qemu-devel] [PATCH v3 4/5] qemu-char: convert some open functions to use Error API zhanghailiang
2014-11-04 13:39 ` Alex Bennée
2014-11-05 7:15 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-11-05 9:08 ` Markus Armbruster
2014-11-04 10:50 ` [Qemu-devel] [PATCH v3 5/5] spice-qemu-char: convert some " zhanghailiang
2014-11-04 13:41 ` Alex Bennée
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=1415098223-32404-4-git-send-email-zhang.zhanghailiang@huawei.com \
--to=zhang.zhanghailiang@huawei.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter.huangpeng@huawei.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).