summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-22 16:28:17 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-22 23:23:06 +0100
commitd5b687e7c25bb5cc2d516bcdbd3b093749cbd337 (patch)
tree23ad80a37bc1e31a311d1be9440b2f68c9f86ebf /src
parent7882632d5a6e9a26e19a51e533d07a2f942cf62c (diff)
virt: make sure we don't ignore some errors
Diffstat (limited to 'src')
-rw-r--r--src/basic/virt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 19b6318e3d..79387007f0 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -201,6 +201,8 @@ static int detect_vm_xen(void) {
r = read_one_line_file("/proc/xen/capabilities", &domcap);
if (r == -ENOENT)
return VIRTUALIZATION_NONE;
+ if (r < 0)
+ return r;
i = domcap;
while ((cap = strsep(&i, ",")))