From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ6Kj-0004BI-Q5 for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:46:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ6Ki-00049a-CR for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:46:44 -0400 Received: from [199.232.76.173] (port=55135 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ6Ki-00049A-4D for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:46:44 -0400 Received: from a40-prg1-8-129.static.adsl.vol.cz ([88.146.54.129]:27342 helo=FilipNavara-PC) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MJ6Kg-0004rE-Qa for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:46:43 -0400 From: Filip Navara Sender: Filip Navara MIME-Version: 1.0 Content-Type: text/plain; boundary=WC_MAIL_PaRt_BoUnDaRy_05151998 Message-Id: Subject: [Qemu-devel] [PATCH 2/2] Remove special Win32 code and replace it with osdep functions. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 23 Jun 2009 13:46:46 -0000 To: qemu-devel@nongnu.org The whole code in the #ifndef _WIN32 block could probably be removed too. No socket or other included functions are used in the savevm.c file. Signed-off-by: Filip Navara --- savevm.c | 23 ++--------------------- 1 files changed, 2 insertions(+), 21 deletions(-) diff --git a/savevm.c b/savevm.c index 17da35a..f10d7f9 100644 --- a/savevm.c +++ b/savevm.c @@ -70,15 +70,6 @@ #endif #endif -#ifdef _WIN32 -#include -#include -#include -#include -#define getopt_long_only getopt_long -#define memalign(align, size) malloc(size) -#endif - #include "qemu-common.h" #include "hw/hw.h" #include "net.h" @@ -1073,11 +1064,7 @@ void do_savevm(Monitor *mon, const char *name) QEMUFile *f; int saved_vm_running; uint32_t vm_state_size; -#ifdef _WIN32 - struct _timeb tb; -#else - struct timeval tv; -#endif + qemu_timeval tv; bs = get_bs_snapshots(); if (!bs) { @@ -1108,15 +1095,9 @@ void do_savevm(Monitor *mon, const char *name) } /* fill auxiliary fields */ -#ifdef _WIN32 - _ftime(&tb); - sn->date_sec = tb.time; - sn->date_nsec = tb.millitm * 1000000; -#else - gettimeofday(&tv, NULL); + qemu_gettimeofday(&tv); sn->date_sec = tv.tv_sec; sn->date_nsec = tv.tv_usec * 1000; -#endif sn->vm_clock_nsec = qemu_get_clock(vm_clock); if (bdrv_get_info(bs, bdi) < 0 || bdi->vm_state_offset <= 0) { -- 1.6.3.msysgit.0