]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Define multi line macros properly
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 31 Oct 2017 10:47:36 +0000 (11:47 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 4 Nov 2017 07:38:08 +0000 (08:38 +0100)
In some cases there's dangling backward slash at the end of multi
line macros. While technically the code works, it will stop if
some empty lines are removed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain-monitor.c
tools/virsh-domain.c
tools/virsh-interface.c
tools/virsh-network.c
tools/virsh-pool.c
tools/virsh-snapshot.c
tools/virsh-volume.c
tools/virsh.h
tools/virt-host-validate-bhyve.c

index 83927eaccde5f42405c1e80d76a8791186c7db6a..b3bfc33c8d4bd4e9fa1b63aa61fd949b71d3cd79 100644 (file)
@@ -41,7 +41,7 @@
 #include "virstring.h"
 
 #define VIRSH_COMMON_OPT_DOMAIN_FULL \
-    VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid")) \
+    VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid"))
 
 VIR_ENUM_DECL(virshDomainIOError)
 VIR_ENUM_IMPL(virshDomainIOError,
index 2491d5b1945940e08b28200aa97d858b7a2cf6fb..42d5526374fc5c0ec17e6b79852275df4a61a56a 100644 (file)
 #endif
 
 #define VIRSH_COMMON_OPT_DOMAIN_FULL \
-    VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid")) \
+    VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid"))
 
 #define VIRSH_COMMON_OPT_DOMAIN_PERSISTENT \
     {.name = "persistent", \
      .type = VSH_OT_BOOL, \
      .help = N_("make live change persistent") \
-    } \
+    }
 
 #define VIRSH_COMMON_OPT_DOMAIN_CONFIG \
-    VIRSH_COMMON_OPT_CONFIG(N_("affect next boot")) \
+    VIRSH_COMMON_OPT_CONFIG(N_("affect next boot"))
 
 #define VIRSH_COMMON_OPT_DOMAIN_LIVE \
-    VIRSH_COMMON_OPT_LIVE(N_("affect running domain")) \
+    VIRSH_COMMON_OPT_LIVE(N_("affect running domain"))
 
 #define VIRSH_COMMON_OPT_DOMAIN_CURRENT \
-    VIRSH_COMMON_OPT_CURRENT(N_("affect current domain")) \
+    VIRSH_COMMON_OPT_CURRENT(N_("affect current domain"))
 
 
 static virDomainPtr
@@ -1302,7 +1302,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
                                     VIR_DOMAIN_BLOCK_IOTUNE_##CONST, \
                                     value) < 0) \
             goto save_error; \
-    } \
+    }
 
     VSH_ADD_IOTUNE_SCALED(total-bytes-sec, TOTAL_BYTES_SEC);
     VSH_ADD_IOTUNE_SCALED(read-bytes-sec, READ_BYTES_SEC);
@@ -1320,7 +1320,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
                                     VIR_DOMAIN_BLOCK_IOTUNE_##CONST, \
                                     value) < 0) \
             goto save_error; \
-    } \
+    }
 
     VSH_ADD_IOTUNE(total-iops-sec, TOTAL_IOPS_SEC);
     VSH_ADD_IOTUNE(read-iops-sec, READ_IOPS_SEC);
@@ -9104,7 +9104,7 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd)
         if (virTypedParamsAddULLong(&params, &nparams, &maxparams, \
                                     FIELD, tmpVal) < 0) \
             goto save_error; \
-    } \
+    }
 
 
     PARSE_MEMTUNE_PARAM("hard-limit", VIR_DOMAIN_MEMORY_HARD_LIMIT);
index 63bad7278920f5a8598e8d96fdb9c8b82b4b16c7..c1a2b21de3b0ced1519c2445413788959f22ef19 100644 (file)
@@ -28,7 +28,7 @@
      .type = VSH_OT_DATA, \
      .flags = VSH_OFLAG_REQ, \
      .help = N_("interface name or MAC address") \
-    } \
+    }
 
 #include <config.h>
 #include "virsh-interface.h"
index 6a04b8de318318fdaea925845f4d28c2172bd607..cd55e384f11e931baa80c9b682b9895fc9816d1d 100644 (file)
@@ -39,7 +39,7 @@
      .type = VSH_OT_DATA, \
      .flags = VSH_OFLAG_REQ, \
      .help = N_("network name or uuid") \
-    } \
+    }
 
 virNetworkPtr
 virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
index d6fc99dcbdf3e3f3bb4aa13d036c65920356c13b..094874b643e0fb12022c5c76780f69ab77134264 100644 (file)
 #include "virtime.h"
 
 #define VIRSH_COMMON_OPT_POOL_FULL \
-    VIRSH_COMMON_OPT_POOL(N_("pool name or uuid")) \
+    VIRSH_COMMON_OPT_POOL(N_("pool name or uuid"))
 
 #define VIRSH_COMMON_OPT_POOL_BUILD \
     {.name = "build", \
      .type = VSH_OT_BOOL, \
      .flags = 0, \
      .help = N_("build the pool as normal") \
-    } \
+    }
 
 #define VIRSH_COMMON_OPT_POOL_NO_OVERWRITE \
     {.name = "no-overwrite", \
      .type = VSH_OT_BOOL, \
      .flags = 0, \
      .help = N_("do not overwrite any existing data") \
-    } \
+    }
 
 #define VIRSH_COMMON_OPT_POOL_OVERWRITE \
     {.name = "overwrite", \
      .type = VSH_OT_BOOL, \
      .flags = 0, \
      .help = N_("overwrite any existing data") \
-    } \
+    }
 
 #define VIRSH_COMMON_OPT_POOL_X_AS \
     {.name = "name", \
     {.name = "adapter-parent", \
      .type = VSH_OT_STRING, \
      .help = N_("adapter parent to be used for underlying storage") \
-    } \
+    }
 
 virStoragePoolPtr
 virshCommandOptPoolBy(vshControl *ctl, const vshCmd *cmd, const char *optname,
index ec06fc708e7462caf90704bea1eb873c942f7e1e..cd89a414aa27da8f8bf9619d5bcff90c40434dc3 100644 (file)
@@ -43,7 +43,7 @@
 #include "conf/snapshot_conf.h"
 
 #define VIRSH_COMMON_OPT_DOMAIN_FULL \
-    VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid")) \
+    VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid"))
 
 /* Helper for snapshot-create and snapshot-create-as */
 static bool
index f540a3240f909ecf59009f45f4c94541e51e7d2b..8265a39795b5c93bda6ab9124eac3527052bafe3 100644 (file)
 #include "virstring.h"
 
 #define VIRSH_COMMON_OPT_POOL_FULL \
-    VIRSH_COMMON_OPT_POOL(N_("pool name or uuid")) \
+    VIRSH_COMMON_OPT_POOL(N_("pool name or uuid"))
 
 #define VIRSH_COMMON_OPT_POOL_NAME \
-    VIRSH_COMMON_OPT_POOL(N_("pool name")) \
+    VIRSH_COMMON_OPT_POOL(N_("pool name"))
 
 #define VIRSH_COMMON_OPT_POOL_OPTIONAL \
     {.name = "pool", \
      .type = VSH_OT_STRING, \
      .help = N_("pool name or uuid") \
-    } \
+    }
 
 #define VIRSH_COMMON_OPT_VOLUME_VOL \
     {.name = "vol", \
      .type = VSH_OT_DATA, \
      .flags = VSH_OFLAG_REQ, \
      .help = N_("vol name, key or path") \
-    } \
+    }
 
 virStorageVolPtr
 virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
index 8aef83b6fe4c5b6e8df13fd3eaaef8866170b167..b353b645a5a791be4496ec0e0781d7244a664ab4 100644 (file)
      .type = VSH_OT_DATA, \
      .flags = VSH_OFLAG_REQ, \
      .help = _helpstr \
-    } \
+    }
 
 # define VIRSH_COMMON_OPT_DOMAIN(_helpstr) \
     {.name = "domain", \
      .type = VSH_OT_DATA, \
      .flags = VSH_OFLAG_REQ, \
      .help = _helpstr \
-    } \
+    }
 
 # define VIRSH_COMMON_OPT_CONFIG(_helpstr) \
     {.name = "config", \
      .type = VSH_OT_BOOL, \
      .help = _helpstr \
-    } \
+    }
 
 # define VIRSH_COMMON_OPT_LIVE(_helpstr) \
     {.name = "live", \
      .type = VSH_OT_BOOL, \
      .help = _helpstr \
-    } \
+    }
 
 # define VIRSH_COMMON_OPT_CURRENT(_helpstr) \
     {.name = "current", \
      .type = VSH_OT_BOOL, \
      .help = _helpstr \
-    } \
+    }
 
 # define VIRSH_COMMON_OPT_FILE(_helpstr) \
     {.name = "file", \
      .type = VSH_OT_DATA, \
      .flags = VSH_OFLAG_REQ, \
      .help = _helpstr \
-    } \
+    }
 
 typedef struct _virshControl virshControl;
 typedef virshControl *virshControlPtr;
index 2ab8e45e6edd0628265946c4a76dcec644abd898..fb0ccd3ec9f21e8fdb893734e5ea9230c07e220d 100644 (file)
@@ -37,7 +37,7 @@
                        _("%s module is not loaded, " err_msg), \
                         #mod); \
         ret = -1; \
-    } \
+    }
 
 #define MODULE_STATUS_FAIL(mod, err_msg) \
     MODULE_STATUS(mod, err_msg, VIR_HOST_VALIDATE_FAIL)