projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb76275
)
virt: add comment that we need to use sscanf()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 16 Jan 2018 14:00:39 +0000
(23:00 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 16 Jan 2018 14:00:39 +0000
(23:00 +0900)
Follow-up for
13e0f9fe8334859ee86f4ff725374d1d83f5baf7
.
See PR #7890 and comment in PR #7581.
src/basic/virt.c
patch
|
blob
|
history
diff --git
a/src/basic/virt.c
b/src/basic/virt.c
index
9b6abf9
..
f4796b5
100644
(file)
--- a/
src/basic/virt.c
+++ b/
src/basic/virt.c
@@
-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));