All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Vinzenz Feenstra <vfeenstr@redhat.com>, Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2] qemu-ga: add guest-get-osinfo command
Date: Tue, 28 Mar 2017 09:19:09 +0000	[thread overview]
Message-ID: <CAJ+F1CJgaZVQSU78Pn4d_AYKfyjCoD0a6jq-xziR0Vq0OtySRw@mail.gmail.com> (raw)
In-Reply-To: <4EA4009B-C060-4700-BB32-60F9A5254C0F@redhat.com>

Hi

On Tue, Mar 28, 2017 at 7:15 AM Vinzenz Feenstra <vfeenstr@redhat.com>
wrote:

> Eric, what you think of this below way, instead?
>
> >
> > OK So how about something like this:
> >
> > {‘struct’: ‘GuestWindowsVersionInfo’,
> >  ‘data’: {
> >       ‘version’: ‘str’,
> >         ‘name’: ‘str’,
> > } }
> >
> > {‘struct’: ‘GuestLinuxOSRelease’,
> >  ‘data’: {
> >         ‘id’: ‘str’,
> >         ‘name’: ‘str'
> >       ‘*version’: ‘str’,
> >         ‘*variant’: ‘str’
> >         ‘*codename’: ‘str’
> > } }
> >
> > {‘enum’: ‘GuestOSVersionInfo’,
> >  ‘data’: {‘linux’: ‘ GuestLinuxOSRelease’,
> >              ‘win’: ‘ GuestWindowsVersionInfo’
> > }}
> >
>

I think this will be rejected. You could instead use a flat 'union' with a
'type' (see SocketAddressFlat for ex).

Otherwise, I like the approach better if the various os-specific details
are needed.

Wouldn't it be nice instead to return xdg os-release content? On OS that
don't have it, it could be crafted manually. Just an idea..

> { 'struct': 'GuestOSInfo’,
> >     'data': {
> >       ‘machine': 'str’,
> >       ’sysname': 'GuestOSType’,
> >       ‘release': ‘str’,
> >       ‘*version_info’: ‘GuestOSVersionInfo’,
> > } }
> >
>

-- 
Marc-André Lureau

  reply	other threads:[~2017-03-28  9:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 10:23 [Qemu-devel] [PATCH] qemu-ga: add guest-get-osinfo command Vinzenz 'evilissimo' Feenstra
2017-03-21 13:39 ` Eric Blake
2017-03-21 14:03   ` Vinzenz Feenstra
2017-03-16 14:50     ` [Qemu-devel] (no subject) Vinzenz 'evilissimo' Feenstra
2017-03-16 14:50       ` [Qemu-devel] [PATCH v2] qemu-ga: add guest-get-osinfo command Vinzenz 'evilissimo' Feenstra
2017-03-23 14:58         ` Eric Blake
2017-03-24  9:48           ` Vinzenz Feenstra
2017-03-28  5:14             ` Vinzenz Feenstra
2017-03-28  9:19               ` Marc-André Lureau [this message]
2017-03-23 13:44       ` [Qemu-devel] (no subject) Eric Blake

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=CAJ+F1CJgaZVQSU78Pn4d_AYKfyjCoD0a6jq-xziR0Vq0OtySRw@mail.gmail.com \
    --to=marcandre.lureau@gmail.com \
    --cc=eblake@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vfeenstr@redhat.com \
    /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.