summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-10-29 11:11:10 +0200
committerMarcelo Tosatti <mtosatti@redhat.com>2009-11-03 11:42:46 -0200
commitb0fd706070ae3297c0b820a55d6d12d12dc48cc0 (patch)
tree2e5e10a5f55742f66728ed0cb3e8f7472cb14ce5
parentvirtio-net: fix macaddr config regression (diff)
downloadqemu-kvm-b0fd706070ae3297c0b820a55d6d12d12dc48cc0.tar.gz
qemu-kvm-b0fd706070ae3297c0b820a55d6d12d12dc48cc0.tar.bz2
qemu-kvm-b0fd706070ae3297c0b820a55d6d12d12dc48cc0.zip
tests: Move typedefs to one place.
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--kvm/user/test/lib/libcflat.h6
-rw-r--r--kvm/user/test/lib/x86/apic.c6
-rw-r--r--kvm/user/test/x86/apic.c6
-rw-r--r--kvm/user/test/x86/tsc.c2
4 files changed, 6 insertions, 14 deletions
diff --git a/kvm/user/test/lib/libcflat.h b/kvm/user/test/lib/libcflat.h
index 1f96cb80e..1da4013f5 100644
--- a/kvm/user/test/lib/libcflat.h
+++ b/kvm/user/test/lib/libcflat.h
@@ -22,6 +22,12 @@
#include <stdarg.h>
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned u32;
+typedef unsigned long ulong;
+typedef unsigned long long u64;
+
extern void exit(int code);
extern void panic(char *fmt, ...);
diff --git a/kvm/user/test/lib/x86/apic.c b/kvm/user/test/lib/x86/apic.c
index 1fc388820..7bb98ed34 100644
--- a/kvm/user/test/lib/x86/apic.c
+++ b/kvm/user/test/lib/x86/apic.c
@@ -4,12 +4,6 @@
static void *g_apic = (void *)0xfee00000;
static void *g_ioapic = (void *)0xfec00000;
-typedef unsigned char u8;
-typedef unsigned short u16;
-typedef unsigned u32;
-typedef unsigned long ulong;
-typedef unsigned long long u64;
-
struct apic_ops {
u32 (*reg_read)(unsigned reg);
void (*reg_write)(unsigned reg, u32 val);
diff --git a/kvm/user/test/x86/apic.c b/kvm/user/test/x86/apic.c
index 1edfba5a4..4e89c775d 100644
--- a/kvm/user/test/x86/apic.c
+++ b/kvm/user/test/x86/apic.c
@@ -2,12 +2,6 @@
#include "apic.h"
#include "vm.h"
-typedef unsigned char u8;
-typedef unsigned short u16;
-typedef unsigned u32;
-typedef unsigned long ulong;
-typedef unsigned long long u64;
-
typedef struct {
unsigned short offset0;
unsigned short selector;
diff --git a/kvm/user/test/x86/tsc.c b/kvm/user/test/x86/tsc.c
index 204b1fd99..394a9c6b8 100644
--- a/kvm/user/test/x86/tsc.c
+++ b/kvm/user/test/x86/tsc.c
@@ -1,7 +1,5 @@
#include "libcflat.h"
-typedef unsigned long long u64;
-
u64 rdtsc(void)
{
unsigned a, d;