diff --git a/src/basic/virt.c b/src/basic/virt.c index fe582833a75..9b6abf9f19d 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -222,8 +222,8 @@ static int detect_vm_xen_dom0(void) { if (r == 0) { unsigned long features; - r = safe_atolu(domcap, &features); - if (r == 0) { + r = sscanf(domcap, "%lx", &features); + if (r == 1) { r = !!(features & (1U << XENFEAT_dom0)); log_debug("Virtualization XEN, found %s with value %08lx, " "XENFEAT_dom0 (indicating the 'hardware domain') is%s set.",