From: Eric Blake Date: Fri, 28 Sep 2012 18:57:54 +0000 (-0600) Subject: storage: match RNG to supported driver types X-Git-Tag: v1.0.0-rc1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2c41e486018ee74f6a75c1f71762234e3f4efd5;p=thirdparty%2Flibvirt.git storage: match RNG to supported driver types At one point, the code passed through arbitrary strings for file formats, which supposedly lets qemu handle a new file type even before libvirt has been taught to handle it. However, to properly label files, libvirt has to learn the file type anyway, so we might as well make our life easier by only accepting file types that we are prepared to handle. This patch lets the RNG validation ensure that only known strings are let through. * docs/schemas/domaincommon.rng (driverFormat): Limit to list of supported strings. * docs/schemas/domainsnapshot.rng (driver): Likewise. --- diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 17ad86b907..2beb035035 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1188,11 +1188,32 @@ - - + + + + aio + + + + raw + dir + bochs + cloop + cow + dmg + iso + qcow + qcow2 + qed + vmdk + vpc + fat + vhd + + @@ -3356,7 +3377,7 @@ - + diff --git a/docs/schemas/domainsnapshot.rng b/docs/schemas/domainsnapshot.rng index 0ef0631246..ecaafe9bae 100644 --- a/docs/schemas/domainsnapshot.rng +++ b/docs/schemas/domainsnapshot.rng @@ -105,7 +105,7 @@ - +