qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] qga: Add `guest-get-timezone` co


From: Eric Blake
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] qga: Add `guest-get-timezone` command
Date: Wed, 22 Mar 2017 11:00:55 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/22/2017 10:46 AM, Vinzenz 'evilissimo' Feenstra wrote:
> From: Vinzenz Feenstra <address@hidden>

This is not a trivial patch (it is adding a new feature), so including
qemu-trivial is not necessary, and it should be merged through the qga
maintainer.

> 
> Adds a new command `guest-get-timezone` reporting the currently
> configured timezone on the system. The information on what timezone is
> currently is configured is useful in case of Windows VMs where the
> offset of the hardware clock is required to have the same offset. This
> can be used for management systems like `oVirt` to detect the timezone
> difference and warn administrators of the misconfiguration.
> 
> Signed-off-by: Vinzenz Feenstra <address@hidden>
> ---
>  qga/commands.c       | 19 +++++++++++++++++++
>  qga/qapi-schema.json | 25 +++++++++++++++++++++++++
>  2 files changed, 44 insertions(+)
> 

> +++ b/qga/qapi-schema.json
> @@ -1042,3 +1042,28 @@
>    'data':    { 'path': 'str', '*arg': ['str'], '*env': ['str'],
>                 '*input-data': 'str', '*capture-output': 'bool' },
>    'returns': 'GuestExec' }
> +
> +
> +##
> +# @GuestTimezone:
> +#
> +# @zone:    Timezone name
> +# @offset:  Offset to UTC in minutes
> +#

Is it worth clarifying that negative numbers imply west of UTC? (There
are some places that get offsets backwards from the usual POSIX
notation, so it never hurts to be specific which direction is intended).


> +##
> +# @guest-get-timezone:
> +#
> +# Retrieves the timezone information from the guest.
> +#
> +# Returns: The guest timezone GuestTimezone information on success.

Sounds rather repetitive; and a struct return is implicitly only
possible on success.  Perhaps it could be shortened to:

# Retrieves timezone information from the guest.
#
# Returns: A GuestTimezone dictionary.

> +#
> +# Since: 2.10
> +##
> +{ 'command': 'guest-get-timezone',
> +  'returns': 'GuestTimezone' }
> 

But the overall idea makes sense to me, so whether or not you wordsmith
the documentation in the .json file,
Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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