[libvirt] [PATCH 4/5] Rename boot_buf to boot_opts

Ján Tomko jtomko at redhat.com
Wed Feb 18 16:39:35 UTC 2015


---
 src/qemu/qemu_command.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f13dbda..0b5fb72 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -8207,7 +8207,7 @@ qemuBuildCommandLine(virConnectPtr conn,
     };
     virArch hostarch = virArchFromHost();
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
-    virBuffer boot_buf = VIR_BUFFER_INITIALIZER;
+    virBuffer boot_opts = VIR_BUFFER_INITIALIZER;
     virBuffer boot_order = VIR_BUFFER_INITIALIZER;
     char *boot_order_str = NULL, *boot_opts_str = NULL;
     int boot_nparams = 0;
@@ -8783,12 +8783,12 @@ qemuBuildCommandLine(virConnectPtr conn,
     if (def->os.bootmenu) {
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOT_MENU)) {
             if (boot_nparams++)
-                virBufferAddChar(&boot_buf, ',');
+                virBufferAddChar(&boot_opts, ',');
 
             if (def->os.bootmenu == VIR_TRISTATE_BOOL_YES)
-                virBufferAddLit(&boot_buf, "menu=on");
+                virBufferAddLit(&boot_opts, "menu=on");
             else
-                virBufferAddLit(&boot_buf, "menu=off");
+                virBufferAddLit(&boot_opts, "menu=off");
         } else {
             /* We cannot emit an error when bootmenu is enabled but
              * unsupported because of backward compatibility */
@@ -8806,9 +8806,9 @@ qemuBuildCommandLine(virConnectPtr conn,
         }
 
         if (boot_nparams++)
-            virBufferAddChar(&boot_buf, ',');
+            virBufferAddChar(&boot_opts, ',');
 
-        virBufferAsprintf(&boot_buf,
+        virBufferAsprintf(&boot_opts,
                           "reboot-timeout=%d",
                           def->os.bios.rt_delay);
     }
@@ -8822,22 +8822,22 @@ qemuBuildCommandLine(virConnectPtr conn,
         }
 
         if (boot_nparams++)
-            virBufferAddChar(&boot_buf, ',');
+            virBufferAddChar(&boot_opts, ',');
 
-        virBufferAsprintf(&boot_buf, "splash-time=%u", def->os.bm_timeout);
+        virBufferAsprintf(&boot_opts, "splash-time=%u", def->os.bm_timeout);
     }
 
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOT_STRICT)) {
         if (boot_nparams++)
-            virBufferAddChar(&boot_buf, ',');
-        virBufferAddLit(&boot_buf, "strict=on");
+            virBufferAddChar(&boot_opts, ',');
+        virBufferAddLit(&boot_opts, "strict=on");
     }
 
-    if (virBufferCheckError(&boot_buf) < 0)
+    if (virBufferCheckError(&boot_opts) < 0)
         goto error;
 
     boot_order_str = virBufferContentAndReset(&boot_order);
-    boot_opts_str = virBufferContentAndReset(&boot_buf);
+    boot_opts_str = virBufferContentAndReset(&boot_opts);
     if (boot_order_str || boot_opts_str) {
         virCommandAddArg(cmd, "-boot");
 
@@ -10342,7 +10342,7 @@ qemuBuildCommandLine(virConnectPtr conn,
 
  error:
     virBufferFreeAndReset(&boot_order);
-    virBufferFreeAndReset(&boot_buf);
+    virBufferFreeAndReset(&boot_opts);
     virObjectUnref(cfg);
     /* free up any resources in the network driver
      * but don't overwrite the original error */
-- 
2.0.5




More information about the libvir-list mailing list