qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qemu-ga: add guest-get-osinfo command


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v2] qemu-ga: add guest-get-osinfo command
Date: Tue, 28 Mar 2017 09:19:09 +0000

Hi

On Tue, Mar 28, 2017 at 7:15 AM Vinzenz Feenstra <address@hidden>
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 via email to

[Prev in Thread] Current Thread [Next in Thread]