From: Cole Robinson <crobinso@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/6] slirp: Remove default_mon usage
Date: Wed, 12 Mar 2014 09:22:38 -0400 [thread overview]
Message-ID: <53205F9E.6000802@redhat.com> (raw)
In-Reply-To: <871ty796n5.fsf@blackfin.pond.sub.org>
On 03/12/2014 04:13 AM, Markus Armbruster wrote:
> Cole Robinson <crobinso@redhat.com> writes:
>
>> These errors don't seem user initiated, so forcibly printing to the
>> monitor doesn't seem right. Just print to stderr.
>>
>> Drop lprint since it's now unused.
>>
>> Cc: Jan Kiszka <jan.kiszka@siemens.com>
>> Signed-off-by: Cole Robinson <crobinso@redhat.com>
>> ---
>> checkpatch flags some pre-existing tab issues, but I didn't retab. Should I?
>>
>> slirp/misc.c | 13 ++-----------
>> slirp/slirp.c | 8 ++++----
>> slirp/slirp.h | 2 --
>> 3 files changed, 6 insertions(+), 17 deletions(-)
>>
>> diff --git a/slirp/misc.c b/slirp/misc.c
>> index 6c1636f..662fb1d 100644
>> --- a/slirp/misc.c
>> +++ b/slirp/misc.c
>> @@ -136,7 +136,7 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
>> if ((s = qemu_socket(AF_INET, SOCK_STREAM, 0)) < 0 ||
>> bind(s, (struct sockaddr *)&addr, addrlen) < 0 ||
>> listen(s, 1) < 0) {
>> - lprint("Error: inet socket: %s\n", strerror(errno));
>> + fprintf(stderr, "Error: inet socket: %s\n", strerror(errno));
>> closesocket(s);
>>
>> return 0;
>
> Why not error_report()?
>
> [...]
>
AFAICT this is only guest initiated, never from the monitor. error_report
sends output to cur_mon if a monitor command is being processed. If this
message triggers while a different monitor command is being processed, do we
really want this unrelated output to go to the monitor?
(Maybe that can't happen in practice, I don't know enough about qemu's
threading model, but I was being cautious)
- Cole
next prev parent reply other threads:[~2014-03-12 13:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 23:15 [Qemu-devel] [PATCH 0/6] error: Misc cleanups and improvements Cole Robinson
2014-03-11 23:15 ` [Qemu-devel] [PATCH 1/6] slirp: Remove default_mon usage Cole Robinson
2014-03-12 7:22 ` Jan Kiszka
2014-03-12 13:06 ` Luiz Capitulino
2014-03-22 18:27 ` Andreas Färber
2014-03-22 21:36 ` Cole Robinson
2014-03-12 8:13 ` Markus Armbruster
2014-03-12 13:22 ` Cole Robinson [this message]
2014-03-12 14:45 ` Markus Armbruster
2014-03-11 23:15 ` [Qemu-devel] [PATCH 2/6] vnc: " Cole Robinson
2014-03-12 7:35 ` Gerd Hoffmann
2014-03-22 20:14 ` Andreas Färber
2014-03-11 23:15 ` [Qemu-devel] [PATCH 3/6] error: Privatize error_print_loc Cole Robinson
2014-03-22 20:04 ` Andreas Färber
2014-03-11 23:15 ` [Qemu-devel] [PATCH 4/6] monitor: Remove unused monitor_print_filename Cole Robinson
2014-03-22 20:06 ` Andreas Färber
2014-03-22 21:44 ` Cole Robinson
2014-03-24 13:09 ` Luiz Capitulino
2014-03-24 13:46 ` Andreas Färber
2014-03-26 13:46 ` Markus Armbruster
2014-03-11 23:15 ` [Qemu-devel] [PATCH 5/6] error: Remove redundant error_printf_unless_qmp Cole Robinson
2014-03-12 8:56 ` Markus Armbruster
2014-03-21 23:41 ` Cole Robinson
2014-03-11 23:15 ` [Qemu-devel] [PATCH 6/6] error: Print error_report() to stderr if using qmp Cole Robinson
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=53205F9E.6000802@redhat.com \
--to=crobinso@redhat.com \
--cc=armbru@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@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).