Rust implementation has deprecated use if "-o option1,option2" in
favor of "--option1" "--option2". Actually, they did so quite
while ago and continued using the old way only for backwards
compatibility. Use "modern" way.

Resolves: https://issues.redhat.com/browse/RHEL-7108
Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
 src/qemu/qemu_virtiofs.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
index 7ff6066f07..2d8eaa4bc5 100644
--- a/src/qemu/qemu_virtiofs.c
+++ b/src/qemu/qemu_virtiofs.c
@@ -130,7 +130,6 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg,
                              int *fd)
 {
     g_autoptr(virCommand) cmd = NULL;
-    g_auto(virBuffer) opts = VIR_BUFFER_INITIALIZER;
 
     /* Some @fs attributes (lock and posix_lock) are not handled here nor
      * anywhwere else. The reason is they exist because (now deprecated) C
@@ -142,26 +141,22 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg,
     virCommandPassFD(cmd, *fd, VIR_COMMAND_PASS_FD_CLOSE_PARENT);
     *fd = -1;
 
-    virCommandAddArg(cmd, "-o");
-    virBufferAddLit(&opts, "source=");
-    virQEMUBuildBufferEscapeComma(&opts, fs->src->path);
+    virCommandAddArgPair(cmd, "--shared-dir", fs->src->path);
+
     if (fs->cache)
-        virBufferAsprintf(&opts, ",cache=%s", 
virDomainFSCacheModeTypeToString(fs->cache));
+        virCommandAddArgPair(cmd, "--cache", 
virDomainFSCacheModeTypeToString(fs->cache));
+
     if (fs->sandbox)
-        virBufferAsprintf(&opts, ",sandbox=%s", 
virDomainFSSandboxModeTypeToString(fs->sandbox));
+        virCommandAddArgPair(cmd, "--sandbox", 
virDomainFSSandboxModeTypeToString(fs->sandbox));
 
     if (fs->xattr == VIR_TRISTATE_SWITCH_ON)
-        virBufferAddLit(&opts, ",xattr");
-    else if (fs->xattr == VIR_TRISTATE_SWITCH_OFF)
-        virBufferAddLit(&opts, ",no_xattr");
-
-    virCommandAddArgBuffer(cmd, &opts);
+        virCommandAddArg(cmd, "--xattr");
 
     if (fs->thread_pool_size >= 0)
         virCommandAddArgFormat(cmd, "--thread-pool-size=%i", 
fs->thread_pool_size);
 
     if (cfg->virtiofsdDebug)
-        virCommandAddArg(cmd, "-d");
+        virCommandAddArg(cmd, "--log-level=debug");
 
     return g_steal_pointer(&cmd);
 }
-- 
2.41.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-le...@lists.libvirt.org

Reply via email to