qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/6] make hpet_in_legacy_mode() return a bool


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 5/6] make hpet_in_legacy_mode() return a bool
Date: Mon, 24 May 2010 17:18:20 +0200

Signed-off-by: Juan Quintela <address@hidden>
---
 hw/hpet.c      |    6 +++---
 hw/hpet_emul.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/hpet.c b/hw/hpet.c
index 0ef3335..33d7f5e 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -39,12 +39,12 @@

 static HPETState *hpet_statep;

-uint32_t hpet_in_legacy_mode(void)
+bool hpet_in_legacy_mode(void)
 {
     if (hpet_statep)
-        return hpet_statep->config & HPET_CFG_LEGACY;
+        return (hpet_statep->config & HPET_CFG_LEGACY) != 0;
     else
-        return 0;
+        return false;
 }

 static uint32_t timer_int_route(struct HPETTimer *timer)
diff --git a/hw/hpet_emul.h b/hw/hpet_emul.h
index b6fae0a..4f90faa 100644
--- a/hw/hpet_emul.h
+++ b/hw/hpet_emul.h
@@ -17,9 +17,9 @@ extern int no_hpet;

 #if !defined(TARGET_I386)

-static inline uint32_t hpet_in_legacy_mode(void)
+static inline bool hpet_in_legacy_mode(void)
 {
-    return 0;
+    return false;
 }

 #else
@@ -85,7 +85,7 @@ typedef struct HPETState {
     uint64_t hpet_counter;      /* main counter */
 } HPETState;

-extern uint32_t hpet_in_legacy_mode(void);
+extern bool hpet_in_legacy_mode(void);
 extern void hpet_init(qemu_irq *irq);
 #endif /* TARGET_I386 */

-- 
1.6.6.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]