From nobody Fri May 3 10:31:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1509449994551981.6910126191976; Tue, 31 Oct 2017 04:39:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D14878EC; Tue, 31 Oct 2017 11:39:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3111B5D9C7; Tue, 31 Oct 2017 11:39:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2F2886EF21; Tue, 31 Oct 2017 11:39:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9VBdkDL004077 for ; Tue, 31 Oct 2017 07:39:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 452FA600CA; Tue, 31 Oct 2017 11:39:46 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9126B600D2 for ; Tue, 31 Oct 2017 11:39:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D14878EC Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 31 Oct 2017 12:39:40 +0100 Message-Id: <20b5cbd43ca74fc891fe630fe2082d2bdc3f7ea4.1509449965.git.mprivozn@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] virsh: Define multi line macros properly X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 31 Oct 2017 11:39:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 --- tools/virsh-domain-monitor.c | 2 +- tools/virsh-domain.c | 20 ++++++++++---------- tools/virsh-interface.c | 2 +- tools/virsh-network.c | 2 +- tools/virsh-pool.c | 10 +++++----- tools/virsh-snapshot.c | 2 +- tools/virsh-volume.c | 8 ++++---- tools/virsh.h | 12 ++++++------ tools/virt-host-validate-bhyve.c | 2 +- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 35d04b22a..e09508248 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -41,7 +41,7 @@ #include "virstring.h" =20 #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")) =20 VIR_ENUM_DECL(virshDomainIOError) VIR_ENUM_IMPL(virshDomainIOError, diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 1e33e8295..53ce5b82f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -66,22 +66,22 @@ #endif =20 #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")) =20 #define VIRSH_COMMON_OPT_DOMAIN_PERSISTENT \ {.name =3D "persistent", \ .type =3D VSH_OT_BOOL, \ .help =3D N_("make live change persistent") \ - } \ + } =20 #define VIRSH_COMMON_OPT_DOMAIN_CONFIG \ - VIRSH_COMMON_OPT_CONFIG(N_("affect next boot")) \ + VIRSH_COMMON_OPT_CONFIG(N_("affect next boot")) =20 #define VIRSH_COMMON_OPT_DOMAIN_LIVE \ - VIRSH_COMMON_OPT_LIVE(N_("affect running domain")) \ + VIRSH_COMMON_OPT_LIVE(N_("affect running domain")) =20 #define VIRSH_COMMON_OPT_DOMAIN_CURRENT \ - VIRSH_COMMON_OPT_CURRENT(N_("affect current domain")) \ + VIRSH_COMMON_OPT_CURRENT(N_("affect current domain")) =20 =20 static virDomainPtr @@ -781,7 +781,7 @@ static const vshCmdOptDef opts_attach_interface[] =3D { * 'average,peak,burst,floor', in which peak and burst are optional, * thus 'average,,burst' and 'average,peak' are also legal. */ =20 -#define VIRSH_PARSE_RATE_FIELD(index, name) = \ +#define VIRSH_PARSE_RATE_FIELD(index, name) = \ do { = \ if (index < ntok && = \ *tok[index] !=3D '\0' && = \ @@ -1302,7 +1302,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd) VIR_DOMAIN_BLOCK_IOTUNE_##CONST, = \ value) < 0) = \ goto save_error; = \ - } = \ + } =20 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; = \ - } = \ + } =20 VSH_ADD_IOTUNE(total-iops-sec, TOTAL_IOPS_SEC); VSH_ADD_IOTUNE(read-iops-sec, READ_IOPS_SEC); @@ -9096,7 +9096,7 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd) return false; =20 #define PARSE_MEMTUNE_PARAM(NAME, FIELD) = \ - if ((rc =3D virshMemtuneGetSize(ctl, cmd, NAME, &tmpVal)) < 0) { = \ + if ((rc =3D virshMemtuneGetSize(ctl, cmd, NAME, &tmpVal)) < 0) { = \ vshError(ctl, _("Unable to parse integer parameter %s"), NAME); = \ goto cleanup; = \ } = \ @@ -9104,7 +9104,7 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd) if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams, = \ FIELD, tmpVal) < 0) = \ goto save_error; = \ - } = \ + } =20 =20 PARSE_MEMTUNE_PARAM("hard-limit", VIR_DOMAIN_MEMORY_HARD_LIMIT); diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index 25e21710f..5ca7393d1 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -28,7 +28,7 @@ .type =3D VSH_OT_DATA, \ .flags =3D VSH_OFLAG_REQ, \ .help =3D N_("interface name or MAC address") \ - } \ + } =20 #include #include "virsh-interface.h" diff --git a/tools/virsh-network.c b/tools/virsh-network.c index eacc2771b..14f7e7f77 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -39,7 +39,7 @@ .type =3D VSH_OT_DATA, \ .flags =3D VSH_OFLAG_REQ, \ .help =3D N_("network name or uuid") \ - } \ + } =20 virNetworkPtr virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd, diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 96a623284..58a336de8 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -35,28 +35,28 @@ #include "virtime.h" =20 #define VIRSH_COMMON_OPT_POOL_FULL \ - VIRSH_COMMON_OPT_POOL(N_("pool name or uuid")) \ + VIRSH_COMMON_OPT_POOL(N_("pool name or uuid")) =20 #define VIRSH_COMMON_OPT_POOL_BUILD \ {.name =3D "build", \ .type =3D VSH_OT_BOOL, \ .flags =3D 0, \ .help =3D N_("build the pool as normal") \ - } \ + } =20 #define VIRSH_COMMON_OPT_POOL_NO_OVERWRITE \ {.name =3D "no-overwrite", \ .type =3D VSH_OT_BOOL, \ .flags =3D 0, \ .help =3D N_("do not overwrite any existing data") \ - } \ + } =20 #define VIRSH_COMMON_OPT_POOL_OVERWRITE \ {.name =3D "overwrite", \ .type =3D VSH_OT_BOOL, \ .flags =3D 0, \ .help =3D N_("overwrite any existing data") \ - } \ + } =20 #define VIRSH_COMMON_OPT_POOL_X_AS \ {.name =3D "name", \ @@ -128,7 +128,7 @@ {.name =3D "adapter-parent", \ .type =3D VSH_OT_STRING, \ .help =3D N_("adapter parent to be used for underlying storage") \ - } \ + } =20 virStoragePoolPtr virshCommandOptPoolBy(vshControl *ctl, const vshCmd *cmd, const char *optn= ame, diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 24cd4abd9..8789ee7b0 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -43,7 +43,7 @@ #include "conf/snapshot_conf.h" =20 #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")) =20 /* Helper for snapshot-create and snapshot-create-as */ static bool diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 0736bdcdb..007657002 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -44,23 +44,23 @@ #include "virstring.h" =20 #define VIRSH_COMMON_OPT_POOL_FULL \ - VIRSH_COMMON_OPT_POOL(N_("pool name or uuid")) \ + VIRSH_COMMON_OPT_POOL(N_("pool name or uuid")) =20 #define VIRSH_COMMON_OPT_POOL_NAME \ - VIRSH_COMMON_OPT_POOL(N_("pool name")) \ + VIRSH_COMMON_OPT_POOL(N_("pool name")) =20 #define VIRSH_COMMON_OPT_POOL_OPTIONAL \ {.name =3D "pool", \ .type =3D VSH_OT_STRING, \ .help =3D N_("pool name or uuid") \ - } \ + } =20 #define VIRSH_COMMON_OPT_VOLUME_VOL \ {.name =3D "vol", \ .type =3D VSH_OT_DATA, \ .flags =3D VSH_OFLAG_REQ, \ .help =3D N_("vol name, key or path") \ - } \ + } =20 virStorageVolPtr virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd, diff --git a/tools/virsh.h b/tools/virsh.h index 9e42ef9bb..9bcf467d4 100644 --- a/tools/virsh.h +++ b/tools/virsh.h @@ -68,39 +68,39 @@ .type =3D VSH_OT_DATA, \ .flags =3D VSH_OFLAG_REQ, \ .help =3D _helpstr \ - } \ + } =20 # define VIRSH_COMMON_OPT_DOMAIN(_helpstr) \ {.name =3D "domain", \ .type =3D VSH_OT_DATA, \ .flags =3D VSH_OFLAG_REQ, \ .help =3D _helpstr \ - } \ + } =20 # define VIRSH_COMMON_OPT_CONFIG(_helpstr) \ {.name =3D "config", \ .type =3D VSH_OT_BOOL, \ .help =3D _helpstr \ - } \ + } =20 # define VIRSH_COMMON_OPT_LIVE(_helpstr) \ {.name =3D "live", \ .type =3D VSH_OT_BOOL, \ .help =3D _helpstr \ - } \ + } =20 # define VIRSH_COMMON_OPT_CURRENT(_helpstr) \ {.name =3D "current", \ .type =3D VSH_OT_BOOL, \ .help =3D _helpstr \ - } \ + } =20 # define VIRSH_COMMON_OPT_FILE(_helpstr) \ {.name =3D "file", \ .type =3D VSH_OT_DATA, \ .flags =3D VSH_OFLAG_REQ, \ .help =3D _helpstr \ - } \ + } =20 typedef struct _virshControl virshControl; typedef virshControl *virshControlPtr; diff --git a/tools/virt-host-validate-bhyve.c b/tools/virt-host-validate-bh= yve.c index c7bf96f05..bd85f8ab0 100644 --- a/tools/virt-host-validate-bhyve.c +++ b/tools/virt-host-validate-bhyve.c @@ -37,7 +37,7 @@ _("%s module is not loaded, " err_msg), \ #mod); \ ret =3D -1; \ - } \ + } =20 #define MODULE_STATUS_FAIL(mod, err_msg) \ MODULE_STATUS(mod, err_msg, VIR_HOST_VALIDATE_FAIL) --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list