aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-01-11 08:43:18 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-11 08:43:18 -0600
commitfedf2de31023b4ee71a4e578db013976243a8143 (patch)
tree045c7ea2a636428ee70545ef3f76a804989be050 /block.c
parente2848a78b0a6715f94623bdf43ef74d3d08cfe4d (diff)
parentc02e1eac887b1b0aee7361b1fcf889e7d47fed9d (diff)
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches: hw/pc.c: Fix converting of ioport_register* to MemoryRegion Replace remaining gmtime, localtime by gmtime_r, localtime_r savevm: Remove MinGW specific code which is no longer needed qga/channel-posix.c: Explicitly include string.h configure: Fix comment (copy+paste bug) readline: avoid memcpy() of overlapping regions Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/block.c b/block.c
index 4e28c55bc7..60873eafea 100644
--- a/block.c
+++ b/block.c
@@ -3338,11 +3338,7 @@ char *get_human_readable_size(char *buf, int buf_size, int64_t size)
char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn)
{
char buf1[128], date_buf[128], clock_buf[128];
-#ifdef _WIN32
- struct tm *ptm;
-#else
struct tm tm;
-#endif
time_t ti;
int64_t secs;
@@ -3352,15 +3348,9 @@ char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn)
"ID", "TAG", "VM SIZE", "DATE", "VM CLOCK");
} else {
ti = sn->date_sec;
-#ifdef _WIN32
- ptm = localtime(&ti);
- strftime(date_buf, sizeof(date_buf),
- "%Y-%m-%d %H:%M:%S", ptm);
-#else
localtime_r(&ti, &tm);
strftime(date_buf, sizeof(date_buf),
"%Y-%m-%d %H:%M:%S", &tm);
-#endif
secs = sn->vm_clock_nsec / 1000000000;
snprintf(clock_buf, sizeof(clock_buf),
"%02d:%02d:%02d.%03d",