[libvirt PATCHv1 2/4] conf: fs: allow missing accessmode in the formatter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So far VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH is always set
in virDomainFSDefPostParse, but future commits aim to change
that.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3c3e381de2..5a1e193b2d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -25436,9 +25436,9 @@ virDomainFSDefFormat(virBufferPtr buf,
         return -1;
     }
 
-    virBufferAsprintf(buf,
-                      "<filesystem type='%s' accessmode='%s'",
-                      type, accessmode);
+    virBufferAsprintf(buf, "<filesystem type='%s'", type);
+    if (def->accessmode != VIR_DOMAIN_FS_ACCESSMODE_DEFAULT)
+        virBufferAsprintf(buf, " accessmode='%s'", accessmode);
     if (def->model) {
         virBufferAsprintf(buf, " model='%s'",
                           virDomainFSModelTypeToString(def->model));
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux