From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 03/15] char-pty: Drop "char device redirected to" message
Date: Thu, 11 Apr 2019 17:37:11 +0200 [thread overview]
Message-ID: <87tvf4v9i0.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <0683b00f-1d17-137b-1273-ba063d0d9dba@redhat.com> (Paolo Bonzini's message of "Thu, 11 Apr 2019 17:22:20 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 11/04/19 16:52, Markus Armbruster wrote:
>> char_pty_open() prints a "char device redirected to PTY_NAME (label
>> LABEL)" message to the current monitor or else to stderr. No other
>> ChardevClass::open() prints anything on success. Drop the message.
>>
>> Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>> chardev/char-pty.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/chardev/char-pty.c b/chardev/char-pty.c
>> index b034332edd..a48d3e5d20 100644
>> --- a/chardev/char-pty.c
>> +++ b/chardev/char-pty.c
>> @@ -211,8 +211,6 @@ static void char_pty_open(Chardev *chr,
>> qemu_set_nonblock(master_fd);
>>
>> chr->filename = g_strdup_printf("pty:%s", pty_name);
>> - error_printf("char device redirected to %s (label %s)\n",
>> - pty_name, chr->label);
>>
>> s = PTY_CHARDEV(chr);
>> s->ioc = QIO_CHANNEL(qio_channel_file_new_fd(master_fd));
>
> The reason for the message is that the char device is completely useless
> until the user knows the /dev/pts/N path[1]. You can get it with "info
> chardev" (aka query-chardev for QMP) but there's an interesting chicken
> and egg problem if the pty is for your monitor...
>
> Paolo
During review of v1, I wrote:
If we should decide the message is still useful enough to be worth
keeping, I could direct it to stdout instead of dropping it.
No clear conclusion emerged, so I did nothing for v2. If we conclude to
keep the message now, I'll gladly do that.
> [1] once you know it, you can use the monitor's readline interface with
> e.g. "socat STDIO,cfmakeraw FILE:/dev/pts/1"
There's also
$ socat UNIX:/path/to/socket READLINE,history=$HOME/.hmp_history,prompt='(qemu) '
Lacks completion. But then our very own reimplementation of readline
lacks any number of other features.
WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 03/15] char-pty: Drop "char device redirected to" message
Date: Thu, 11 Apr 2019 17:37:11 +0200 [thread overview]
Message-ID: <87tvf4v9i0.fsf@dusky.pond.sub.org> (raw)
Message-ID: <20190411153711.puFYd7w085Ahvgnun5J_MSGjhlF9HW0qo1NQmZf5xpg@z> (raw)
In-Reply-To: <0683b00f-1d17-137b-1273-ba063d0d9dba@redhat.com> (Paolo Bonzini's message of "Thu, 11 Apr 2019 17:22:20 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 11/04/19 16:52, Markus Armbruster wrote:
>> char_pty_open() prints a "char device redirected to PTY_NAME (label
>> LABEL)" message to the current monitor or else to stderr. No other
>> ChardevClass::open() prints anything on success. Drop the message.
>>
>> Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>> chardev/char-pty.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/chardev/char-pty.c b/chardev/char-pty.c
>> index b034332edd..a48d3e5d20 100644
>> --- a/chardev/char-pty.c
>> +++ b/chardev/char-pty.c
>> @@ -211,8 +211,6 @@ static void char_pty_open(Chardev *chr,
>> qemu_set_nonblock(master_fd);
>>
>> chr->filename = g_strdup_printf("pty:%s", pty_name);
>> - error_printf("char device redirected to %s (label %s)\n",
>> - pty_name, chr->label);
>>
>> s = PTY_CHARDEV(chr);
>> s->ioc = QIO_CHANNEL(qio_channel_file_new_fd(master_fd));
>
> The reason for the message is that the char device is completely useless
> until the user knows the /dev/pts/N path[1]. You can get it with "info
> chardev" (aka query-chardev for QMP) but there's an interesting chicken
> and egg problem if the pty is for your monitor...
>
> Paolo
During review of v1, I wrote:
If we should decide the message is still useful enough to be worth
keeping, I could direct it to stdout instead of dropping it.
No clear conclusion emerged, so I did nothing for v2. If we conclude to
keep the message now, I'll gladly do that.
> [1] once you know it, you can use the monitor's readline interface with
> e.g. "socat STDIO,cfmakeraw FILE:/dev/pts/1"
There's also
$ socat UNIX:/path/to/socket READLINE,history=$HOME/.hmp_history,prompt='(qemu) '
Lacks completion. But then our very own reimplementation of readline
lacks any number of other features.
next prev parent reply other threads:[~2019-04-11 15:37 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 14:52 [Qemu-devel] [PATCH v2 00/15] Clean up use of error_printf() Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 01/15] qemu-img: Use error_vreport() in error_exit() Markus Armbruster
2019-04-11 14:52 ` Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 02/15] block/ssh: Do not report read/write/flush errors to the user Markus Armbruster
2019-04-11 14:52 ` Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 03/15] char-pty: Drop "char device redirected to" message Markus Armbruster
2019-04-11 15:22 ` Paolo Bonzini
2019-04-11 15:37 ` Markus Armbruster [this message]
2019-04-11 15:37 ` Markus Armbruster
2019-04-17 18:09 ` Markus Armbruster
2019-04-17 18:09 ` Markus Armbruster
2019-04-11 15:23 ` Peter Krempa
2019-04-11 15:23 ` Peter Krempa
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 04/15] loader-fit: Wean off error_printf() Markus Armbruster
2019-04-11 14:52 ` Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 05/15] mips/boston: Report errors with error_report(), not error_printf() Markus Armbruster
2019-04-11 14:52 ` Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 06/15] pci: Report fatal " Markus Armbruster
2019-04-11 14:52 ` Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 07/15] hpet: Report warnings with warn_report(), " Markus Armbruster
2019-04-11 14:52 ` Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 08/15] vfio: " Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 09/15] s390x/kvm: " Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 10/15] vl: Make -machine $TYPE, help and -accel help print to stdout Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 11/15] monitor error: Make printf()-like functions return a value Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 12/15] qemu-print: New qemu_printf(), qemu_vprintf() etc Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 13/15] blockdev: Make -drive format=help print to stdout Markus Armbruster
2019-04-11 14:52 ` Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 14/15] char: Make -chardev help " Markus Armbruster
2019-04-11 14:52 ` [Qemu-devel] [PATCH v2 15/15] monitor: Simplify how -device/device_add print help Markus Armbruster
2019-04-17 18:11 ` [Qemu-devel] [PATCH v2 14.5/15] char-pty: Print "char device redirected" message to stdout Markus Armbruster
2019-04-17 18:21 ` no-reply
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=87tvf4v9i0.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.