We're going to need it elsewhere very soon.

Signed-off-by: Andrea Bolognani <abolo...@redhat.com>
---
 src/conf/domain_validate.c | 4 ++--
 src/conf/domain_validate.h | 3 +++
 src/libvirt_private.syms   | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index 5559a71e14..db13e56107 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -1586,14 +1586,14 @@ virDomainDefMemtuneValidate(const virDomainDef *def)
 }
 
 
-static int
+int
 virDomainDefOSValidate(const virDomainDef *def,
                        virDomainXMLOption *xmlopt)
 {
     virDomainLoaderDef *loader = def->os.loader;
 
     if (def->os.firmware) {
-        if (!(xmlopt->config.features & VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT)) 
{
+        if (xmlopt && !(xmlopt->config.features & 
VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT)) {
             virReportError(VIR_ERR_XML_DETAIL, "%s",
                            _("firmware auto selection not implemented for this 
driver"));
             return -1;
diff --git a/src/conf/domain_validate.h b/src/conf/domain_validate.h
index 07b99195e3..fc441cef5b 100644
--- a/src/conf/domain_validate.h
+++ b/src/conf/domain_validate.h
@@ -44,3 +44,6 @@ int virDomainDiskDefValidateSource(const virStorageSource 
*src);
 int virDomainDiskDefValidateStartupPolicy(const virDomainDiskDef *disk);
 
 int virDomainDiskDefSourceLUNValidate(const virStorageSource *src);
+
+int virDomainDefOSValidate(const virDomainDef *def,
+                           virDomainXMLOption *xmlopt);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index e550e7139d..5a356ccd48 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -793,6 +793,7 @@ virDomainDefPostParse;
 
 # conf/domain_validate.h
 virDomainActualNetDefValidate;
+virDomainDefOSValidate;
 virDomainDefValidate;
 virDomainDeviceValidateAliasForHotplug;
 virDomainDiskDefSourceLUNValidate;
-- 
2.39.1

Reply via email to