summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl
diff options
context:
space:
mode:
authorGleydson Soares <gsoares@cvs.openbsd.org>2013-05-08 00:15:04 +0000
committerGleydson Soares <gsoares@cvs.openbsd.org>2013-05-08 00:15:04 +0000
commita49a960b5fad35dd525b06a8e8c3a71dc13d4df9 (patch)
treeeba1a11f91589133251ed01461613887f0c80d3b /usr.sbin/ldomctl
parent8d5584dfda178de1cd60a1f49a40b43a7f456eb2 (diff)
tweak hvmd_init_guest() to check if everything was OK in md_read(),
otherwise print out an error string and exit. OK jasper@ kettenis@
Diffstat (limited to 'usr.sbin/ldomctl')
-rw-r--r--usr.sbin/ldomctl/config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ldomctl/config.c b/usr.sbin/ldomctl/config.c
index 7cef14167d7..5d538bdfe57 100644
--- a/usr.sbin/ldomctl/config.c
+++ b/usr.sbin/ldomctl/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.18 2013/04/03 15:38:48 kettenis Exp $ */
+/* $OpenBSD: config.c,v 1.19 2013/05/08 00:15:03 gsoares Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -717,6 +717,10 @@ hvmd_init_guest(struct md *md, struct md_node *node)
xasprintf(&path, "%s.md", guest->name);
guest->md = md_read(path);
+
+ if (guest->md == NULL)
+ err(1, "unable to get guest MD");
+
free(path);
}