qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Paulo Neves" <ptsneves@gmail.com>
Cc: QEMU <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] chardev: Allow for pty path passing.
Date: Thu, 3 Jan 2019 14:18:15 -0600	[thread overview]
Message-ID: <9a0aaed2-f97c-a2b1-1d7b-b6a0ac29b1af@redhat.com> (raw)
In-Reply-To: <CAJ+F1C+k6k2KLZWKFQ_4RPxWWeDWhEbLaq6g2iESyhk2kjVLEQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]

On 1/2/19 2:23 AM, Marc-André Lureau wrote:
> Hi
> 
> On Sat, Dec 29, 2018 at 2:34 PM Paulo Neves <ptsneves@gmail.com> wrote:
>>
>> If a user requires a virtual serial device like provided
>> by the pty char device, the user needs to accept the
>> returned device name. This makes the program need to
>> have smarts to parse or communicate with qemu to get the
>> pty device.
>> With this patch the program can pass the path where
>> a symlink to the pty device will be, removing the
>> need for 2 way communication or smarts.
> 
> This seems reasonable. Your patch doesn't apply on master, can you rebase it?
> 

>> +++ b/qapi/char.json
>> @@ -224,7 +224,7 @@
>>  ##
>>  # @ChardevHostdev:
>>  #
>> -# Configuration info for device and pipe chardevs.
>> +# Configuration info for device, pty and pipe chardevs.
>>  #
>>  # @device: The name of the special file for the device,
>>  #          i.e. /dev/ttyS0 on Unix or COM1: on Windows
>> @@ -380,7 +380,7 @@
>>                                         'pipe'   : 'ChardevHostdev',
>>                                         'socket' : 'ChardevSocket',
>>                                         'udp'    : 'ChardevUdp',
>> -                                       'pty'    : 'ChardevCommon',
>> +                                       'pty'    : 'ChardevHostdev',
> 
> Better to create a new ChardevPty instead (ChardevHostdev is for host
> device, here it is not)

A new type with identical member names is indistinguishable in
introspection.  You could even rename s/ChardevHostdev/ChardevDevice/
for use by both 'pipe' and 'pty', since all the more ChardevHostdev did
over ChardevCommon was add a 'device' member (since renaming types is
transparent to introspection).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-01-03 20:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-29 10:15 [Qemu-devel] [PATCH] chardev: Allow for pty path passing Paulo Neves
2018-12-29 10:15 ` Paulo Neves
2019-01-02  8:23   ` Marc-André Lureau
2019-01-03 20:18     ` Eric Blake [this message]
2019-01-03 21:14     ` Paulo Neves

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=9a0aaed2-f97c-a2b1-1d7b-b6a0ac29b1af@redhat.com \
    --to=eblake@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=ptsneves@gmail.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).