All of lore.kernel.org
 help / color / mirror / Atom feed
From: mdroth <mdroth@linux.vnet.ibm.com>
To: Lei Li <lilei@linux.vnet.ibm.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] qga: add support to get host time
Date: Wed, 9 Jan 2013 09:36:37 -0600	[thread overview]
Message-ID: <20130109153637.GA1543@vm> (raw)
In-Reply-To: <1357466820-12860-2-git-send-email-lilei@linux.vnet.ibm.com>

On Sun, Jan 06, 2013 at 06:06:58PM +0800, Lei Li wrote:
> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
> ---
>  qga/commands-posix.c |   18 ++++++++++++++++++
>  qga/qapi-schema.json |   17 +++++++++++++++++
>  2 files changed, 35 insertions(+), 0 deletions(-)
> 
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index a657201..26b0fa0 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -91,6 +91,24 @@ exit_err:
>      error_set(err, QERR_UNDEFINED_ERROR);
>  }
> 
> +static HostTimeInfo *get_host_time(void)
> +{

Should squash this into patch #2, since it doesn't get used
till then. Otherwise we'll break build bisection when compiling
with -Wunused/-Wall && -Werror, which is usually the default.

> +    int err;
> +    qemu_timeval tq;
> +    HostTimeInfo *host_time;
> +
> +    err = qemu_gettimeofday(&tq);
> +    if (err < 0) {
> +        return NULL;
> +    }
> +
> +    host_time = g_malloc0(sizeof(HostTimeInfo));
> +    host_time->seconds = tq.tv_sec;
> +    host_time->microseconds = tq.tv_usec;
> +
> +    return host_time;
> +}
> +
>  typedef struct GuestFileHandle {
>      uint64_t id;
>      FILE *fh;
> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
> index ed0eb69..7793aff 100644
> --- a/qga/qapi-schema.json
> +++ b/qga/qapi-schema.json
> @@ -83,6 +83,23 @@
>  { 'command': 'guest-ping' }
> 
>  ##
> +# @HostTimeInfo
> +#
> +# Information about host time.
> +#
> +# @seconds: "seconds" time from the host.
> +#
> +# @microseconds: "microseconds" time from the host.
> +#
> +# @utc-offset: information about utc offset.
> +#
> +# Since: 1.4
> +##
> +{ 'type': 'HostTimeInfo',
> +  'data': { 'seconds': 'int', 'microseconds': 'int',
> +             'utc-offset': 'int' } }
> +
> +##
>  # @GuestAgentCommandInfo:
>  #
>  # Information about guest agent commands.
> -- 
> 1.7.7.6
> 

  parent reply	other threads:[~2013-01-09 15:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 10:06 [Qemu-devel] [RFC PATCH 0/3] Time resync support by qemu-ga Lei Li
2013-01-06 10:06 ` [Qemu-devel] [PATCH 1/3] qga: add support to get host time Lei Li
2013-01-07 21:52   ` Eric Blake
2013-01-11  7:18     ` Lei Li
2013-01-11 15:37       ` Eric Blake
2013-01-14  3:17         ` Lei Li
2013-01-14 14:23           ` Eric Blake
2013-01-09 13:32   ` Luiz Capitulino
2013-01-11  7:19     ` Lei Li
2013-01-11 11:14       ` Luiz Capitulino
2013-01-09 15:36   ` mdroth [this message]
2013-01-11  7:20     ` Lei Li
2013-01-06 10:06 ` [Qemu-devel] [PATCH 2/3] qga: add guest-get-time command Lei Li
2013-01-07 22:04   ` Eric Blake
2013-01-11  7:37     ` Lei Li
2013-01-11 17:28       ` mdroth
2013-01-09 13:33   ` Luiz Capitulino
2013-01-11  7:50     ` Lei Li
2013-01-06 10:07 ` [Qemu-devel] [PATCH 3/3] qga: add guest-set-time command Lei Li
2013-01-07 22:26   ` Eric Blake
2013-01-11  8:00     ` Lei Li
2013-01-09 13:40   ` Luiz Capitulino
2013-01-11  8:03     ` Lei Li
2013-01-07 19:01 ` [Qemu-devel] [RFC PATCH 0/3] Time resync support by qemu-ga Eric Blake
2013-01-11  7:36   ` Lei Li

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=20130109153637.GA1543@vm \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=lilei@linux.vnet.ibm.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 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.