Blob Blame History Raw
From 2fdb0fe7911b41f3578072431da1b65e9d499c49 Mon Sep 17 00:00:00 2001
Message-Id: <2fdb0fe7911b41f3578072431da1b65e9d499c49@dist-git>
From: Matthias Bolte <matthias.bolte@googlemail.com>
Date: Tue, 8 Sep 2015 09:52:57 +0200
Subject: [PATCH] vmx: Some whitespace cleanup

https://bugzilla.redhat.com/show_bug.cgi?id=1172544

(cherry picked from commit 1d204cf19617b87f0bddfb0d9855ee99d7f5d2ae)
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/vmx/vmx.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index e77de62..3b23c0d 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2,7 +2,7 @@
  * vmx.c: VMware VMX parsing/formatting functions
  *
  * Copyright (C) 2010-2014 Red Hat, Inc.
- * Copyright (C) 2009-2010 Matthias Bolte <matthias.bolte@googlemail.com>
+ * Copyright (C) 2009-2011, 2014-2015 Matthias Bolte <matthias.bolte@googlemail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -2189,8 +2189,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Invalid or not yet handled value '%s' "
                              "for VMX entry '%s' for device type '%s'"),
-                             fileName, fileName_name,
-                             deviceType ? deviceType : "unknown");
+                           fileName, fileName_name,
+                           deviceType ? deviceType : "unknown");
             goto cleanup;
         }
     } else if (device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
@@ -2246,8 +2246,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Invalid or not yet handled value '%s' "
                              "for VMX entry '%s' for device type '%s'"),
-                             fileName, fileName_name,
-                             deviceType ? deviceType : "unknown");
+                           fileName, fileName_name,
+                           deviceType ? deviceType : "unknown");
             goto cleanup;
         }
     } else if (device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) {
@@ -2270,8 +2270,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Invalid or not yet handled value '%s' "
                              "for VMX entry '%s' for device type '%s'"),
-                             fileName, fileName_name,
-                             deviceType ? deviceType : "unknown");
+                           fileName, fileName_name,
+                           deviceType ? deviceType : "unknown");
             goto cleanup;
         }
     } else {
@@ -2543,8 +2543,8 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def)
             STRCASENEQ(virtualDev, "e1000e")) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Expecting VMX entry '%s' to be 'vlance' or 'vmxnet' or "
-                             "'vmxnet3' or 'e1000e' or 'e1000e' but found '%s'"), virtualDev_name,
-                           virtualDev);
+                             "'vmxnet3' or 'e1000e' or 'e1000e' but found '%s'"),
+                           virtualDev_name, virtualDev);
             goto cleanup;
         }
 
@@ -3358,7 +3358,7 @@ virVMXFormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer)
 
 int
 virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
-                     virBufferPtr buffer)
+                 virBufferPtr buffer)
 {
     int controllerOrBus, unit;
     const char *vmxDeviceType = NULL;
@@ -3374,7 +3374,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
      * an ISO.
      */
     const char *fileExt = (def->device == VIR_DOMAIN_DISK_DEVICE_DISK) ?
-                            ".vmdk" : ".iso";
+                           ".vmdk" : ".iso";
 
     /* Check that we got a valid device type */
     if (def->device != VIR_DOMAIN_DISK_DEVICE_DISK &&
@@ -3417,7 +3417,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
     if (def->device == VIR_DOMAIN_DISK_DEVICE_DISK &&
         type == VIR_STORAGE_TYPE_FILE) {
         vmxDeviceType = (def->bus == VIR_DOMAIN_DISK_BUS_SCSI) ?
-            "scsi-hardDisk" : "ata-hardDisk";
+                        "scsi-hardDisk" : "ata-hardDisk";
     } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
         if (type == VIR_STORAGE_TYPE_FILE)
             vmxDeviceType = "cdrom-image";
@@ -3489,6 +3489,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
         virBufferAsprintf(buffer,
                           "%s%d:%d.mode = \"independent-nonpersistent\"\n",
                           busType, controllerOrBus, unit);
+
     return 0;
 }
 
-- 
2.5.2