From e2c41e486018ee74f6a75c1f71762234e3f4efd5 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 28 Sep 2012 12:57:54 -0600 Subject: [PATCH] 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. --- docs/schemas/domaincommon.rng | 27 ++++++++++++++++++++++++--- docs/schemas/domainsnapshot.rng | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) 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 @@ - + -- GitLab