From nobody Mon Feb 9 03:14:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1626695343; cv=none; d=zohomail.com; s=zohoarc; b=CGMTmgUKwnTKBWlIVsyAAwtYsak4tHgMU5uMlgApSf9wWj2irZqNELUFoWqFuPhuJmWp/rL0JTQT+1H/WrVCQstzg0rgSc+J34BD2hoCjAeNbAcfZloEvImGGT6jnjICP2up8nAD4yO8b8B9COl+92wsFORp9jqKB9njDXqG4LA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626695343; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=akqV6kts/LnF7tcexG4jvHxhcMuugKg50LZjpyzOYjk=; b=IXzDgLcMvg5K3ajVDK8t8b9Y5rEj9G+VhsGdEKyY7Up0i5ys6ns/K82d1C4FyCdeP1BWv9093Zbj00Cvq/3Hyseaq2VeFVqfzSwNtaoGAhvUVfVIBssrN1tSlFMVl2mmEjnlmY2SJd1BhOKAqv9ck8/vis9wSeBd9BGvsItomhY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626695343083401.4188276663954; Mon, 19 Jul 2021 04:49:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-emUjTTRVNLCLqCvRb8-BWw-1; Mon, 19 Jul 2021 07:48:26 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9C0C1084F57; Mon, 19 Jul 2021 11:48:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC3AE5DEFA; Mon, 19 Jul 2021 11:48:20 +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 7A1491809CB4; Mon, 19 Jul 2021 11:48:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16JBm2JN012164 for ; Mon, 19 Jul 2021 07:48:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id AE67C60CA0; Mon, 19 Jul 2021 11:48:02 +0000 (UTC) Received: from andariel.local (unknown [10.40.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FBC160C82 for ; Mon, 19 Jul 2021 11:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626695342; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=akqV6kts/LnF7tcexG4jvHxhcMuugKg50LZjpyzOYjk=; b=B+e3RKqCjJC8FrjUt6JeYAptBL0RsUl+OqpaDRRxIuHUqWXd5VU7RLQSrAFffC0+EU4Bmh muOTpmsB0ZwO80zkLkapMVkouLfjeZ0YeZtLCtSlajREpc2tLebVhhw1quu3EpuWyovReR yTwK60YIk0trCRAM9BBlOEO6q04C5Z0= X-MC-Unique: emUjTTRVNLCLqCvRb8-BWw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/5] virsh-domain: Avoid 'vir' prefix for locally declared VIR_ENUM* helpers Date: Mon, 19 Jul 2021 13:47:52 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626695344579100001 Content-Type: text/plain; charset="utf-8" Stuff used in virsh should use 'virsh'. Signed-off-by: Peter Krempa --- tools/virsh-completer-domain.c | 8 ++++---- tools/virsh-domain.c | 16 ++++++++-------- tools/virsh-domain.h | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 14e4d95ec3..0df11807e1 100644 --- a/tools/virsh-completer-domain.c +++ b/tools/virsh-completer-domain.c @@ -762,7 +762,7 @@ virshDomainSignalCompleter(vshControl *ctl G_GNUC_UNUSE= D, tmp =3D g_new0(char *, VIR_DOMAIN_PROCESS_SIGNAL_LAST + 1); for (i =3D 0; i < VIR_DOMAIN_PROCESS_SIGNAL_LAST; i++) { - const char *name =3D virDomainProcessSignalTypeToString(i); + const char *name =3D virshDomainProcessSignalTypeToString(i); tmp[i] =3D g_strdup(name); } @@ -783,7 +783,7 @@ virshDomainLifecycleCompleter(vshControl *ctl G_GNUC_UN= USED, tmp =3D g_new0(char *, VIR_DOMAIN_LIFECYCLE_LAST + 1); for (i =3D 0; i < VIR_DOMAIN_LIFECYCLE_LAST; i++) { - const char *name =3D virDomainLifecycleTypeToString(i); + const char *name =3D virshDomainLifecycleTypeToString(i); tmp[i] =3D g_strdup(name); } @@ -804,7 +804,7 @@ virshDomainLifecycleActionCompleter(vshControl *ctl G_G= NUC_UNUSED, tmp =3D g_new0(char *, VIR_DOMAIN_LIFECYCLE_ACTION_LAST + 1); for (i =3D 0; i < VIR_DOMAIN_LIFECYCLE_ACTION_LAST; i++) { - const char *action =3D virDomainLifecycleActionTypeToString(i); + const char *action =3D virshDomainLifecycleActionTypeToString(i); tmp[i] =3D g_strdup(action); } @@ -956,7 +956,7 @@ virshDomainCoreDumpFormatCompleter(vshControl *ctl G_GN= UC_UNUSED, ret =3D g_new0(char *, VIR_DOMAIN_CORE_DUMP_FORMAT_LAST + 1); for (i =3D 0; i < VIR_DOMAIN_CORE_DUMP_FORMAT_LAST; i++) - ret[i] =3D g_strdup(virDomainCoreDumpFormatTypeToString(i)); + ret[i] =3D g_strdup(virshDomainCoreDumpFormatTypeToString(i)); return ret; } diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index f59be4e29d..6fb057736b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -5410,7 +5410,7 @@ static const vshCmdOptDef opts_dump[] =3D { {.name =3D NULL} }; -VIR_ENUM_IMPL(virDomainCoreDumpFormat, +VIR_ENUM_IMPL(virshDomainCoreDumpFormat, VIR_DOMAIN_CORE_DUMP_FORMAT_LAST, "elf", "kdump-zlib", @@ -5463,7 +5463,7 @@ doDump(void *opaque) } if (vshCommandOptStringQuiet(ctl, cmd, "format", &format) > 0) { - if ((dumpformat =3D virDomainCoreDumpFormatTypeFromString(form= at)) < 0) { + if ((dumpformat =3D virshDomainCoreDumpFormatTypeFromString(fo= rmat)) < 0) { vshError(ctl, _("format '%s' is not supported, expecting " "'kdump-zlib', 'kdump-lzo', 'kdump-snappy'= , " "'win-dmp' or 'elf'"), format); @@ -5711,13 +5711,13 @@ static const vshCmdOptDef opts_setLifecycleAction[]= =3D { {.name =3D NULL} }; -VIR_ENUM_IMPL(virDomainLifecycle, +VIR_ENUM_IMPL(virshDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST, "poweroff", "reboot", "crash"); -VIR_ENUM_IMPL(virDomainLifecycleAction, +VIR_ENUM_IMPL(virshDomainLifecycleAction, VIR_DOMAIN_LIFECYCLE_ACTION_LAST, "destroy", "restart", @@ -5754,13 +5754,13 @@ cmdSetLifecycleAction(vshControl *ctl, const vshCmd= *cmd) return false; } - if ((tmpVal =3D virDomainLifecycleTypeFromString(typeStr)) < 0) { + if ((tmpVal =3D virshDomainLifecycleTypeFromString(typeStr)) < 0) { vshError(ctl, _("Invalid lifecycle type '%s'."), typeStr); return false; } type =3D tmpVal; - if ((tmpVal =3D virDomainLifecycleActionTypeFromString(actionStr)) < 0= ) { + if ((tmpVal =3D virshDomainLifecycleActionTypeFromString(actionStr)) <= 0) { vshError(ctl, _("Invalid lifecycle action '%s'."), actionStr); return false; } @@ -8894,7 +8894,7 @@ static const vshCmdOptDef opts_send_process_signal[] = =3D { {.name =3D NULL} }; -VIR_ENUM_IMPL(virDomainProcessSignal, +VIR_ENUM_IMPL(virshDomainProcessSignal, VIR_DOMAIN_PROCESS_SIGNAL_LAST, "nop", "hup", "int", "quit", "ill", /* 0-4 */ "trap", "abrt", "bus", "fpe", "kill", /* 5-9 */ @@ -8928,7 +8928,7 @@ static int getSignalNumber(const char *signame) else if (STRPREFIX(p, "sig")) p +=3D 3; - return virDomainProcessSignalTypeFromString(p); + return virshDomainProcessSignalTypeFromString(p); } static bool diff --git a/tools/virsh-domain.h b/tools/virsh-domain.h index 0c1cc7a630..a1ac1cf1d4 100644 --- a/tools/virsh-domain.h +++ b/tools/virsh-domain.h @@ -40,7 +40,7 @@ VIR_ENUM_DECL(virshDomainHostnameSource); extern const vshCmdDef domManagementCmds[]; -VIR_ENUM_DECL(virDomainProcessSignal); -VIR_ENUM_DECL(virDomainLifecycle); -VIR_ENUM_DECL(virDomainLifecycleAction); -VIR_ENUM_DECL(virDomainCoreDumpFormat); +VIR_ENUM_DECL(virshDomainProcessSignal); +VIR_ENUM_DECL(virshDomainLifecycle); +VIR_ENUM_DECL(virshDomainLifecycleAction); +VIR_ENUM_DECL(virshDomainCoreDumpFormat); --=20 2.31.1