chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d5c028
)
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
Sven Eden
<yamakuzure@gmx.net>
Wed, 30 May 2018 05:50:09 +0000
(07:50 +0200)
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 4c3791381a5176f86997a4ee85805e786747ca45..bb6b70f98e101aa74a31ee298107bdac5d080052 100644
(file)
--- a/
src/basic/virt.c
+++ b/
src/basic/virt.c
@@
-223,6
+223,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));