Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
#include "sysemu/sysemu.h"
#include "qom/object.h"
-int tcg_tb_size;
+unsigned long tcg_tb_size;
static bool tcg_allowed = true;
static int tcg_init(MachineState *ms)
#define ACCEL_GET_CLASS(obj) \
OBJECT_GET_CLASS(AccelClass, (obj), TYPE_ACCEL)
-extern int tcg_tb_size;
+extern unsigned long tcg_tb_size;
void configure_accelerator(MachineState *ms);
/* Register accelerator specific global properties */
configure_rtc(opts);
break;
case QEMU_OPTION_tb_size:
- tcg_tb_size = strtol(optarg, NULL, 0);
- if (tcg_tb_size < 0) {
- tcg_tb_size = 0;
+ if (qemu_strtoul(optarg, NULL, 0, &tcg_tb_size) < 0) {
+ error_report("Invalid argument to -tb-size");
+ exit(1);
}
break;
case QEMU_OPTION_icount: