virt: add comment that we need to use sscanf()
Follow-up for 13e0f9fe83.
See PR #7890 and comment in PR #7581.
This commit is contained in:
@@ -222,6 +222,8 @@ static int detect_vm_xen_dom0(void) {
|
||||
if (r == 0) {
|
||||
unsigned long features;
|
||||
|
||||
/* Here, we need to use sscanf() instead of safe_atoul()
|
||||
* as the string lacks the leading "0x". */
|
||||
r = sscanf(domcap, "%lx", &features);
|
||||
if (r == 1) {
|
||||
r = !!(features & (1U << XENFEAT_dom0));
|
||||
|
||||
Reference in New Issue
Block a user