aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-09-27 14:30:33 +0400
committermalc <av1474@comtv.ru>2009-09-27 14:41:13 +0400
commit705e83f6545278e530b6537d34943c217320b244 (patch)
treea5601dc64a3e77802fdaf205f5fe2121a0a69367 /vl.c
parentee3993069ff55fa6f1c64daf1e09963e340db8e4 (diff)
vl: Do not use perror after failed Win32 API calls
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index e12f1d3ee0..fe23311d15 100644
--- a/vl.c
+++ b/vl.c
@@ -1445,7 +1445,8 @@ static int win32_start_timer(struct qemu_alarm_timer *t)
flags);
if (!data->timerId) {
- perror("Failed to initialize win32 alarm timer");
+ fprintf(stderr, "Failed to initialize win32 alarm timer: %d\n",
+ GetLastError());
timeEndPeriod(data->period);
return -1;
}
@@ -1482,7 +1483,8 @@ static void win32_rearm_timer(struct qemu_alarm_timer *t)
TIME_ONESHOT | TIME_PERIODIC);
if (!data->timerId) {
- perror("Failed to re-arm win32 alarm timer");
+ fprintf(stderr, "Failed to re-arm win32 alarm timer %d\n",
+ GetLastError());
timeEndPeriod(data->period);
exit(1);
@@ -3379,7 +3381,7 @@ static int qemu_event_init(void)
{
qemu_event_handle = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!qemu_event_handle) {
- perror("Failed CreateEvent");
+ fprintf(stderr, "Failed CreateEvent: %d\n", GetLastError());
return -1;
}
qemu_add_wait_object(qemu_event_handle, dummy_event_handler, NULL);