From: Eric Blake Date: Mon, 19 Aug 2013 22:32:31 +0000 (-0600) Subject: virt-xml-validate: add missing schemas X-Git-Tag: v1.1.2-rc1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab4304b7e0b90a18c5ec528028d0f1a6d1317c8c;p=thirdparty%2Flibvirt.git 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 , , and . Signed-off-by: Eric Blake --- diff --git a/tools/virt-xml-validate.in b/tools/virt-xml-validate.in index 5ba034331e..6bfa68fe0e 100644 --- a/tools/virt-xml-validate.in +++ b/tools/virt-xml-validate.in @@ -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