From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com,
Claudio Fontana <claudio.fontana@huawei.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] Is ivshmem's test for unix domain client socket valid?
Date: Mon, 23 Nov 2015 15:25:29 +0100 [thread overview]
Message-ID: <565321D9.7080604@redhat.com> (raw)
In-Reply-To: <871tbktuzy.fsf@blackfin.pond.sub.org>
On 20/11/2015 18:56, Markus Armbruster wrote:
> Looks rather fishy:
>
> if (strncmp(s->server_chr->filename, "unix:", 5)) {
> error_setg(errp, "chardev is not a unix client socket");
> return;
> }
>
> Paolo, is this reliable?
Yes, though by total chance (which is already a curious definition of
reliability). If you create "-chardev file,path=unix:foo",
chr->filename ends up with "file" because only pty and socket chardevs
set chr->filename. Everything else does not set it, and the field is
thus set to the default---the backend name.
> Is it the proper way to check?
It's the only one, which makes it the most proper too. Sarcasm is
intentional.
Paolo
next prev parent reply other threads:[~2015-11-23 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 17:56 [Qemu-devel] Is ivshmem's test for unix domain client socket valid? Markus Armbruster
2015-11-23 14:25 ` Paolo Bonzini [this message]
2015-11-24 12:26 ` [Qemu-devel] Is ivshmem's use of qemu_chr_open_eventfd() kosher? (was: Is ivshmem's test for unix domain client socket valid?) Markus Armbruster
2015-11-24 12:43 ` [Qemu-devel] Is ivshmem's use of qemu_chr_open_eventfd() kosher? Paolo Bonzini
2015-11-24 13:15 ` Markus Armbruster
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=565321D9.7080604@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=claudio.fontana@huawei.com \
--cc=lcapitulino@redhat.com \
--cc=marcandre.lureau@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).