diff options
Diffstat (limited to 'hw/i386/vmport.c')
-rw-r--r-- | hw/i386/vmport.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index e6d169566d..359cdef1e0 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -37,10 +37,6 @@ #include "cpu.h" #include "trace.h" -#define VMPORT_CMD_GETVERSION 0x0a -#define VMPORT_CMD_GETRAMSIZE 0x14 - -#define VMPORT_ENTRIES 0x2c #define VMPORT_MAGIC 0x564D5868 /* Compatibility flags for migration */ @@ -71,12 +67,9 @@ typedef struct VMPortState { static VMPortState *port_state; -void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque) +void vmport_register(VMPortCommand command, VMPortReadFunc *func, void *opaque) { - if (command >= VMPORT_ENTRIES) { - return; - } - + assert(command < VMPORT_ENTRIES); trace_vmport_register(command, func, opaque); port_state->func[command] = func; port_state->opaque[command] = opaque; |