提交 ab4304b7 编写于 作者: E Eric Blake

virt-xml-validate: add missing schemas

We were failing to autoprobe which schema to use for several
top-level XML elements.

* tools/virt-xml-validate.in (TYPE): Recognize <domainsnapshot>,
<filter>, and <secret>.
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 b2ea248e
......@@ -56,6 +56,9 @@ fi
if [ -z "$TYPE" ]; then
ROOT=`xmllint --stream --debug "$XMLFILE" 2>/dev/null | grep "^0 1 " | awk '{ print $3 }'`
case "$ROOT" in
*domainsnapshot*) # Must come first, since *domain* is a substring
TYPE="domainsnapshot"
;;
*domain*)
TYPE="domain"
;;
......@@ -74,6 +77,12 @@ if [ -z "$TYPE" ]; then
*device*)
TYPE="nodedev"
;;
*filter*)
TYPE="nwfilter"
;;
*secret*)
TYPE="secret"
;;
*)
echo "$0: cannot determine schema type for $XMLFILE" >&2
exit 3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册