While at it, use members of libxl_tsc_mode enum instead of literal int values. Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx> --- src/libxl/libxl_conf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 3e6d623..b5186f2 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -318,13 +318,16 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, case VIR_DOMAIN_TIMER_NAME_TSC: switch (def->clock.timers[i]->mode) { case VIR_DOMAIN_TIMER_MODE_NATIVE: - b_info->tsc_mode = 2; + b_info->tsc_mode = LIBXL_TSC_MODE_NATIVE; break; case VIR_DOMAIN_TIMER_MODE_PARAVIRT: - b_info->tsc_mode = 3; + b_info->tsc_mode = LIBXL_TSC_MODE_NATIVE_PARAVIRT; + break; + case VIR_DOMAIN_TIMER_MODE_EMULATE: + b_info->tsc_mode = LIBXL_TSC_MODE_ALWAYS_EMULATE; break; default: - b_info->tsc_mode = 1; + b_info->tsc_mode = LIBXL_TSC_MODE_DEFAULT; } break; -- 2.9.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list