From f768198a93329f105a522367e9c0bab4a8a79381 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> References: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> From: Michal Novotny Date: Tue, 7 May 2013 18:36:49 +0200 Subject: [PATCH 019/114] Revert "qga: add guest-get-time command" This reverts commit 619b85e258f7edb595dc8d1683a0626b743e638d. Reverting as asked by Laszlo in message <51892739.2030807@redhat.com> because of the ordering issue (most likely) related to supersed testing. Signed-off-by: Michal Novotny --- qapi-schema-guest.json | 13 ------------- qga/commands-posix.c | 16 ---------------- qga/commands-win32.c | 6 ------ 3 files changed, 35 deletions(-) diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json index bb0f75e..d91d903 100644 --- a/qapi-schema-guest.json +++ b/qapi-schema-guest.json @@ -83,19 +83,6 @@ { 'command': 'guest-ping' } ## -# @guest-get-time: -# -# Get the information about guest time relative to the Epoch -# of 1970-01-01 in UTC. -# -# Returns: Time in nanoseconds. -# -# Since 1.5 -## -{ 'command': 'guest-get-time', - 'returns': 'int' } - -## # @GuestAgentCommandInfo: # # Information about guest agent commands. diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 4e0e01f..2285d4a 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -120,22 +120,6 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **err) /* succeded */ } -int64_t qmp_guest_get_time(Error **errp) -{ - int ret; - qemu_timeval tq; - int64_t time_ns; - - ret = qemu_gettimeofday(&tq); - if (ret < 0) { - error_setg_errno(errp, errno, "Failed to get time"); - return -1; - } - - time_ns = tq.tv_sec * 1000000000LL + tq.tv_usec * 1000; - return time_ns; -} - typedef struct GuestFileHandle { uint64_t id; FILE *fh; diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 88fe5ba..5bd8fb2 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -278,12 +278,6 @@ GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **err) return NULL; } -int64_t qmp_guest_get_time(Error **errp) -{ - error_set(errp, QERR_UNSUPPORTED); - return -1; -} - /* register init/cleanup routines for stateful command groups */ void ga_command_state_init(GAState *s, GACommandState *cs) { -- 1.7.11.7