From patchwork Mon Apr 15 21:26:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 162283 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3422458jan; Mon, 15 Apr 2019 14:27:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwC4Z3ji5vQZXQJ9OtYoxvwD0tsGLzX4viB5HDuVIvP+LU2YJRK9LS7IUsy6B2aQ7GfiqX2 X-Received: by 2002:ac8:36c9:: with SMTP id b9mr61519285qtc.281.1555363626030; Mon, 15 Apr 2019 14:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555363626; cv=none; d=google.com; s=arc-20160816; b=govvHVLVZ4v0IS6REZJfL++OGh3axwub2Oxox8V4N6nVdDZCNjcLxp3vfC9oeQ5nez abfzXriVBso3j+jDo0PN+i6v4xtsGHvosnEgnjJ7GXpeR8dSos81lK4luzVnjYOi/cTQ 5/Jo/aReKXKHPzMyMV+FD/F3etOy+YcsyOEt1NBPM5Nc6UNl9AF8ZahLHnLz7zApRVFz HXY9D6la1ZThroraB/xJd5Ds/z2yWRcq0W36Q+efI85iCQu3SLagUim7Rbz0o2KX/Vj/ v31Jw+8MlFflowRjlv4RR6M5d2OfgOzET7BkD1CpLLRPo0PWD3YJpWlAU09lgVGEOBR+ aEUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=XCDlPLgdRbUFhk3VMswvy9HXfJgKCwcy5fAdjYJetBE=; b=DqWPvs3RYiyiwXWO4hBdvpUgvQ+ewBjZI1X9Pcm6QWxk0ME5kqieK4FUXpobGWkECo z7zCKXTbljmHq7T5maZguzWnnFYduk8QeuMKrVlvfnSNC67+etG7InrMAOj2z3jZW72i rC1tr4w6vHy/PJLuTUu+dT0HSOWepeII5tvKCArxjNuomU+wwLnCAU5iReb+JGBZxBvS h+iTsFhJ8kmhGIw1bTmQIbK42C5s2VnbByxQ8BElziYA3QUnQdpdk07nXatoNiN1GTSa HEYKaoCccXa/GkvmTCLwPpV6bQInFQfSzGC8K3xSLMYwuRN/7r5oAZ9p68GOazAt3FSA YYYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id y10si2977303qkl.86.2019.04.15.14.27.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 14:27:06 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B84CE59441; Mon, 15 Apr 2019 21:27:04 +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 91F93608C2; Mon, 15 Apr 2019 21:27:04 +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 55D803FB12; Mon, 15 Apr 2019 21:27:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FLQrJt032240 for ; Mon, 15 Apr 2019 17:26:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1160F608C8; Mon, 15 Apr 2019 21:26:53 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-124-108.rdu2.redhat.com [10.10.124.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88C69608C2; Mon, 15 Apr 2019 21:26:52 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 15 Apr 2019 17:26:40 -0400 Message-Id: <023e3a93a9fcab311b5db29956831c2fedd8e591.1555363505.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/3] util: enum: Add 'label' arg to virEnum*String 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 15 Apr 2019 21:27:05 +0000 (UTC) This will allow VIR_ENUM_IMPL calls to register a string label which will be used to raise errors from virEnum*String functions. For example, if virDomainVirtType may use label='domain type', sp virEnumFromString called with bad value='zzz' will raise: invalid argument: Unknown 'domain type' value 'zzz' Signed-off-by: Cole Robinson --- src/util/virenum.c | 21 +++++++++++++++++---- src/util/virenum.h | 12 ++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/util/virenum.c b/src/util/virenum.c index 26093bd795..6ae8d9fb2a 100644 --- a/src/util/virenum.c +++ b/src/util/virenum.c @@ -18,6 +18,7 @@ #include #include "virenum.h" +#include "virerror.h" #include "virstring.h" #define VIR_FROM_THIS VIR_FROM_NONE @@ -60,16 +61,22 @@ virTristateSwitchFromBool(bool val) int virEnumFromString(const char * const *types, unsigned int ntypes, - const char *type) + const char *type, + const char *label) { size_t i; if (!type) - return -1; + goto error; for (i = 0; i < ntypes; i++) if (STREQ(types[i], type)) return i; + error: + if (label) { + virReportError(VIR_ERR_INVALID_ARG, + _("Unknown '%s' value '%s'"), label, NULLSTR(type)); + } return -1; } @@ -77,10 +84,16 @@ virEnumFromString(const char * const *types, const char * virEnumToString(const char * const *types, unsigned int ntypes, - int type) + int type, + const char *label) { - if (type < 0 || type >= ntypes) + if (type < 0 || type >= ntypes) { + if (label) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unknown '%s' internal value %d"), label, type); + } return NULL; + } return types[type]; } diff --git a/src/util/virenum.h b/src/util/virenum.h index 3ae1a70b72..706ae752d8 100644 --- a/src/util/virenum.h +++ b/src/util/virenum.h @@ -24,24 +24,28 @@ int virEnumFromString(const char * const *types, unsigned int ntypes, - const char *type); + const char *type, + const char *label); const char * virEnumToString(const char * const *types, unsigned int ntypes, - int type); + int type, + const char *label); # define VIR_ENUM_IMPL(name, lastVal, ...) \ static const char *const name ## TypeList[] = { __VA_ARGS__ }; \ const char *name ## TypeToString(int type) { \ return virEnumToString(name ## TypeList, \ ARRAY_CARDINALITY(name ## TypeList), \ - type); \ + type, \ + NULL); \ } \ int name ## TypeFromString(const char *type) { \ return virEnumFromString(name ## TypeList, \ ARRAY_CARDINALITY(name ## TypeList), \ - type); \ + type, \ + NULL); \ } \ verify(ARRAY_CARDINALITY(name ## TypeList) == lastVal) From patchwork Mon Apr 15 21:26:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 162284 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3422507jan; Mon, 15 Apr 2019 14:27:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPqpkOsBxsPDoMSsfCebNCRVR62wXPOsI+PoIh94HHaECfxQCm4Hjc1iUoUYU3mUKDOaDV X-Received: by 2002:a37:4897:: with SMTP id v145mr59061671qka.268.1555363629584; Mon, 15 Apr 2019 14:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555363629; cv=none; d=google.com; s=arc-20160816; b=b5qleowuMrKNoN4VE0YkriHOI3jpVMmSSw3DsOAVi6zUbI1qkFJ77fHTmhr+zG0P04 rdYXmOsIranfBiTl7hjhwsWffG0+8e4OaDy/nHFo5MIm9ELwihZzc1LOu7N+6RFNGE+Q VO+QN60HcVvWk/vqg7d7utVX9IDLcVZzHUMDj+cF9Ydrq202IDZ15V69pkM4ZD4mhiFV XqzF5GAgX30a2VIIsMIZBQyTvKMSrAnYpWlrZ8ee4QeK3YF/8HcnpplZm1xJ4FelNHrM VkYstatKJ0APlNb2Z9cuy/qZyFmOk85oXLBWfA3q6WBr+2yl05WcJ/KZUYY7A7IVLicH AwfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=JDKh1/1ZrDOH40SAf7+4G8cmBSptfLkEjoPIb5T6+hk=; b=I74hUrz6C8EpDouUQAFQ0L9rNikmLgWakGQzkcXE4nVeJMlK2v33xqRm2s63hDxiJh 7A5Nog1oXi78TuHcKmJa6iWnAtskN6qFWAjRj/SXCvAgotVE9bo7/eIKz7KOXtF9D5CR GyfrLuQz9UMHsTIiLpipGLjzEXnpzORgZ5gTwu7WoE4am9C2DAioNp5kekUDHd75LSnT 2sRY09YRiO+tRLjcyUNz+SCsduhWdDoo2s4qvFWo5rFz7lJc5L64d0izzwb5fS/3Xx6J NfPkMlzqtCHKBXJHmb7sERT7NDkRjvCUR4mFWc/K9vsevfVJba02Tv+RP8Att5lYDQfs KVlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id 50si3237524qts.280.2019.04.15.14.27.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 14:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CC6586678; Mon, 15 Apr 2019 21:27:08 +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 D45C4608C7; Mon, 15 Apr 2019 21:27:07 +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 9A16B181AC46; Mon, 15 Apr 2019 21:27:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FLQsS0032248 for ; Mon, 15 Apr 2019 17:26:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 12382608C6; Mon, 15 Apr 2019 21:26:54 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-124-108.rdu2.redhat.com [10.10.124.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EBED608C2; Mon, 15 Apr 2019 21:26:53 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 15 Apr 2019 17:26:41 -0400 Message-Id: <892aba0a84a1a0354bfff4615b555afb99f31775.1555363505.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/3] util: enum: Add NULL 'label' arg VIR_ENUM_IMPL calls 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 15 Apr 2019 21:27:08 +0000 (UTC) Allow passing in a 'label' string for raising errors from ToString/FromString calls. Adjust all VIR_ENUM_IMPL calls to pass in NULL to disable error reporting. We will add strings at a later time. Signed-off-by: Cole Robinson --- docs/apibuild.py | 14 ++ src/access/viraccessperm.c | 20 +-- src/conf/capabilities.c | 2 +- src/conf/cpu_conf.c | 14 +- src/conf/device_conf.c | 2 +- src/conf/domain_capabilities.c | 2 +- src/conf/domain_conf.c | 240 +++++++++++++++--------------- src/conf/interface_conf.c | 2 +- src/conf/netdev_vlan_conf.c | 2 +- src/conf/network_conf.c | 10 +- src/conf/node_device_conf.c | 8 +- src/conf/numa_conf.c | 6 +- src/conf/nwfilter_conf.c | 14 +- src/conf/snapshot_conf.c | 4 +- src/conf/storage_adapter_conf.c | 2 +- src/conf/storage_conf.c | 18 +-- src/libxl/libxl_domain.c | 2 +- src/locking/lock_daemon.c | 2 +- src/logging/log_daemon.c | 2 +- src/lxc/lxc_domain.c | 6 +- src/lxc/lxc_native.c | 2 +- src/network/leaseshelper.c | 2 +- src/qemu/qemu_agent.c | 4 +- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_command.c | 18 +-- src/qemu/qemu_domain.c | 8 +- src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_firmware.c | 6 +- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_migration_cookie.c | 2 +- src/qemu/qemu_migration_params.c | 6 +- src/qemu/qemu_monitor.c | 8 +- src/qemu/qemu_monitor_json.c | 8 +- src/remote/remote_daemon.c | 2 +- src/util/vircgroup.c | 2 +- src/util/vircgroupbackend.c | 2 +- src/util/vircgroupv1.c | 2 +- src/util/vircgroupv2.c | 2 +- src/util/virconf.c | 2 +- src/util/virenum.c | 4 +- src/util/virenum.h | 6 +- src/util/virerror.c | 2 +- src/util/virfirewall.c | 2 +- src/util/virfirewalld.c | 4 +- src/util/virgic.c | 2 +- src/util/virhook.c | 14 +- src/util/virkeycode.c | 2 +- src/util/virlog.c | 2 +- src/util/virmdev.c | 2 +- src/util/virnetdev.c | 6 +- src/util/virnetdevmacvlan.c | 2 +- src/util/virnetdevvportprofile.c | 4 +- src/util/virpci.c | 6 +- src/util/virperf.c | 2 +- src/util/virprocess.c | 2 +- src/util/virresctrl.c | 8 +- src/util/virsecret.c | 2 +- src/util/virstorageencryption.c | 4 +- src/util/virstoragefile.c | 14 +- src/util/virsysinfo.c | 2 +- src/util/virtypedparam.c | 2 +- src/vmware/vmware_conf.c | 2 +- src/vmx/vmx.c | 2 +- tools/virsh-domain-monitor.c | 24 +-- tools/virsh-domain.c | 54 +++---- tools/virsh-host.c | 2 +- tools/virsh-network.c | 8 +- tools/virsh-nodedev.c | 2 +- tools/virsh-pool.c | 4 +- tools/virsh-secret.c | 2 +- tools/virsh-volume.c | 4 +- tools/virt-admin.c | 2 +- tools/virt-host-validate-common.c | 2 +- 73 files changed, 336 insertions(+), 322 deletions(-) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/docs/apibuild.py b/docs/apibuild.py index 9e04871220..82e103ccbc 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -1404,6 +1404,20 @@ class CParser: self.error("parsing VIR_ENUM_IMPL: expecting ','", token) token = self.token() + # The 'label' field + if (token[0] != "string" and not + (token[0] == "name" and token[1] == "NULL")): + self.error("parsing VIR_ENUM_IMPL: expecting string or NULL", + token) + token = self.token() + + if token[0] != "sep": + self.error("parsing VIR_ENUM_IMPL: expecting ','", token) + + if token[1] != ',': + self.error("parsing VIR_ENUM_IMPL: expecting ','", token) + token = self.token() + # Now the sentinel name if token[0] != "name": self.error("parsing VIR_ENUM_IMPL: expecting name", token) diff --git a/src/access/viraccessperm.c b/src/access/viraccessperm.c index 67f751ef9c..a2aa5406b7 100644 --- a/src/access/viraccessperm.c +++ b/src/access/viraccessperm.c @@ -23,7 +23,7 @@ #include "viraccessperm.h" -VIR_ENUM_IMPL(virAccessPermConnect, +VIR_ENUM_IMPL(virAccessPermConnect, NULL, VIR_ACCESS_PERM_CONNECT_LAST, "getattr", "read", "write", "search_domains", "search_networks", @@ -34,7 +34,7 @@ VIR_ENUM_IMPL(virAccessPermConnect, "interface_transaction", ); -VIR_ENUM_IMPL(virAccessPermDomain, +VIR_ENUM_IMPL(virAccessPermDomain, NULL, VIR_ACCESS_PERM_DOMAIN_LAST, "getattr", "read", "write", "read_secure", "start", "stop", "reset", @@ -47,44 +47,44 @@ VIR_ENUM_IMPL(virAccessPermDomain, "open_namespace", "set_time", "set_password", ); -VIR_ENUM_IMPL(virAccessPermInterface, +VIR_ENUM_IMPL(virAccessPermInterface, NULL, VIR_ACCESS_PERM_INTERFACE_LAST, "getattr", "read", "write", "save", "delete", "start", "stop", ); -VIR_ENUM_IMPL(virAccessPermNetwork, +VIR_ENUM_IMPL(virAccessPermNetwork, NULL, VIR_ACCESS_PERM_NETWORK_LAST, "getattr", "read", "write", "save", "delete", "start", "stop", ); -VIR_ENUM_IMPL(virAccessPermNodeDevice, +VIR_ENUM_IMPL(virAccessPermNodeDevice, NULL, VIR_ACCESS_PERM_NODE_DEVICE_LAST, "getattr", "read", "write", "start", "stop", "detach", ); -VIR_ENUM_IMPL(virAccessPermNWFilter, +VIR_ENUM_IMPL(virAccessPermNWFilter, NULL, VIR_ACCESS_PERM_NWFILTER_LAST, "getattr", "read", "write", "save", "delete", ); -VIR_ENUM_IMPL(virAccessPermNWFilterBinding, +VIR_ENUM_IMPL(virAccessPermNWFilterBinding, NULL, VIR_ACCESS_PERM_NWFILTER_BINDING_LAST, "getattr", "read", "create", "delete", ); -VIR_ENUM_IMPL(virAccessPermSecret, +VIR_ENUM_IMPL(virAccessPermSecret, NULL, VIR_ACCESS_PERM_SECRET_LAST, "getattr", "read", "write", "read_secure", "save", "delete", ); -VIR_ENUM_IMPL(virAccessPermStoragePool, +VIR_ENUM_IMPL(virAccessPermStoragePool, NULL, VIR_ACCESS_PERM_STORAGE_POOL_LAST, "getattr", "read", "write", "save", "delete", "start", "stop", @@ -92,7 +92,7 @@ VIR_ENUM_IMPL(virAccessPermStoragePool, "format", ); -VIR_ENUM_IMPL(virAccessPermStorageVol, +VIR_ENUM_IMPL(virAccessPermStorageVol, NULL, VIR_ACCESS_PERM_STORAGE_VOL_LAST, "getattr", "read", "create", "delete", "format", "resize", "data_read", diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 1231b9727c..3eeda0832a 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -50,7 +50,7 @@ VIR_LOG_INIT("conf.capabilities"); VIR_ENUM_DECL(virCapsHostPMTarget); -VIR_ENUM_IMPL(virCapsHostPMTarget, +VIR_ENUM_IMPL(virCapsHostPMTarget, NULL, VIR_NODE_SUSPEND_TARGET_LAST, "suspend_mem", "suspend_disk", "suspend_hybrid", ); diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 33c8b99e49..97ab9e4ece 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -32,26 +32,26 @@ VIR_LOG_INIT("conf.cpu_conf"); -VIR_ENUM_IMPL(virCPU, +VIR_ENUM_IMPL(virCPU, NULL, VIR_CPU_TYPE_LAST, "host", "guest", "auto", ); -VIR_ENUM_IMPL(virCPUMode, +VIR_ENUM_IMPL(virCPUMode, NULL, VIR_CPU_MODE_LAST, "custom", "host-model", "host-passthrough", ); -VIR_ENUM_IMPL(virCPUMatch, +VIR_ENUM_IMPL(virCPUMatch, NULL, VIR_CPU_MATCH_LAST, "minimum", "exact", "strict", ); -VIR_ENUM_IMPL(virCPUCheck, +VIR_ENUM_IMPL(virCPUCheck, NULL, VIR_CPU_CHECK_LAST, "default", "none", @@ -59,13 +59,13 @@ VIR_ENUM_IMPL(virCPUCheck, "full", ); -VIR_ENUM_IMPL(virCPUFallback, +VIR_ENUM_IMPL(virCPUFallback, NULL, VIR_CPU_FALLBACK_LAST, "allow", "forbid", ); -VIR_ENUM_IMPL(virCPUFeaturePolicy, +VIR_ENUM_IMPL(virCPUFeaturePolicy, NULL, VIR_CPU_FEATURE_LAST, "force", "require", @@ -74,7 +74,7 @@ VIR_ENUM_IMPL(virCPUFeaturePolicy, "forbid", ); -VIR_ENUM_IMPL(virCPUCacheMode, +VIR_ENUM_IMPL(virCPUCacheMode, NULL, VIR_CPU_CACHE_MODE_LAST, "emulate", "passthrough", diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 2f82bdc2a7..c74dd003b9 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -31,7 +31,7 @@ #define VIR_FROM_THIS VIR_FROM_DEVICE -VIR_ENUM_IMPL(virDomainDeviceAddress, +VIR_ENUM_IMPL(virDomainDeviceAddress, NULL, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST, "none", "pci", diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 2e7e1c206b..37a540e60b 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -27,7 +27,7 @@ #define VIR_FROM_THIS VIR_FROM_CAPABILITIES -VIR_ENUM_IMPL(virDomainCapsCPUUsable, +VIR_ENUM_IMPL(virDomainCapsCPUUsable, NULL, VIR_DOMCAPS_CPU_USABLE_LAST, "unknown", "yes", "no", ); diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b969a9f6e5..60b8feee0c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -89,7 +89,7 @@ struct _virDomainXMLOption { VIR_DOMAIN_DEF_FORMAT_INACTIVE | \ VIR_DOMAIN_DEF_FORMAT_MIGRATABLE) -VIR_ENUM_IMPL(virDomainTaint, +VIR_ENUM_IMPL(virDomainTaint, NULL, VIR_DOMAIN_TAINT_LAST, "custom-argv", "custom-monitor", @@ -104,7 +104,7 @@ VIR_ENUM_IMPL(virDomainTaint, "custom-ga-command", ); -VIR_ENUM_IMPL(virDomainVirt, +VIR_ENUM_IMPL(virDomainVirt, NULL, VIR_DOMAIN_VIRT_LAST, "none", "qemu", @@ -124,7 +124,7 @@ VIR_ENUM_IMPL(virDomainVirt, "vz", ); -VIR_ENUM_IMPL(virDomainOS, +VIR_ENUM_IMPL(virDomainOS, NULL, VIR_DOMAIN_OSTYPE_LAST, "hvm", "xen", @@ -134,7 +134,7 @@ VIR_ENUM_IMPL(virDomainOS, "xenpvh", ); -VIR_ENUM_IMPL(virDomainBoot, +VIR_ENUM_IMPL(virDomainBoot, NULL, VIR_DOMAIN_BOOT_LAST, "fd", "cdrom", @@ -142,7 +142,7 @@ VIR_ENUM_IMPL(virDomainBoot, "network", ); -VIR_ENUM_IMPL(virDomainFeature, +VIR_ENUM_IMPL(virDomainFeature, NULL, VIR_DOMAIN_FEATURE_LAST, "acpi", "apic", @@ -166,14 +166,14 @@ VIR_ENUM_IMPL(virDomainFeature, "msrs", ); -VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, +VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, NULL, VIR_DOMAIN_CAPABILITIES_POLICY_LAST, "default", "allow", "deny", ); -VIR_ENUM_IMPL(virDomainHyperv, +VIR_ENUM_IMPL(virDomainHyperv, NULL, VIR_DOMAIN_HYPERV_LAST, "relaxed", "vapic", @@ -191,18 +191,18 @@ VIR_ENUM_IMPL(virDomainHyperv, "evmcs", ); -VIR_ENUM_IMPL(virDomainKVM, +VIR_ENUM_IMPL(virDomainKVM, NULL, VIR_DOMAIN_KVM_LAST, "hidden", ); -VIR_ENUM_IMPL(virDomainMsrsUnknown, +VIR_ENUM_IMPL(virDomainMsrsUnknown, NULL, VIR_DOMAIN_MSRS_UNKNOWN_LAST, "ignore", "fault", ); -VIR_ENUM_IMPL(virDomainCapsFeature, +VIR_ENUM_IMPL(virDomainCapsFeature, NULL, VIR_DOMAIN_CAPS_FEATURE_LAST, "audit_control", "audit_write", @@ -243,14 +243,14 @@ VIR_ENUM_IMPL(virDomainCapsFeature, "wake_alarm", ); -VIR_ENUM_IMPL(virDomainLifecycle, +VIR_ENUM_IMPL(virDomainLifecycle, NULL, VIR_DOMAIN_LIFECYCLE_LAST, "poweroff", "reboot", "crash", ); -VIR_ENUM_IMPL(virDomainLifecycleAction, +VIR_ENUM_IMPL(virDomainLifecycleAction, NULL, VIR_DOMAIN_LIFECYCLE_ACTION_LAST, "destroy", "restart", @@ -260,7 +260,7 @@ VIR_ENUM_IMPL(virDomainLifecycleAction, "coredump-restart", ); -VIR_ENUM_IMPL(virDomainLockFailure, +VIR_ENUM_IMPL(virDomainLockFailure, NULL, VIR_DOMAIN_LOCK_FAILURE_LAST, "default", "poweroff", @@ -269,7 +269,7 @@ VIR_ENUM_IMPL(virDomainLockFailure, "ignore", ); -VIR_ENUM_IMPL(virDomainDevice, +VIR_ENUM_IMPL(virDomainDevice, NULL, VIR_DOMAIN_DEVICE_LAST, "none", "disk", @@ -298,7 +298,7 @@ VIR_ENUM_IMPL(virDomainDevice, "vsock", ); -VIR_ENUM_IMPL(virDomainDiskDevice, +VIR_ENUM_IMPL(virDomainDiskDevice, NULL, VIR_DOMAIN_DISK_DEVICE_LAST, "disk", "cdrom", @@ -306,7 +306,7 @@ VIR_ENUM_IMPL(virDomainDiskDevice, "lun", ); -VIR_ENUM_IMPL(virDomainDiskGeometryTrans, +VIR_ENUM_IMPL(virDomainDiskGeometryTrans, NULL, VIR_DOMAIN_DISK_TRANS_LAST, "default", "none", @@ -314,7 +314,7 @@ VIR_ENUM_IMPL(virDomainDiskGeometryTrans, "lba", ); -VIR_ENUM_IMPL(virDomainDiskBus, +VIR_ENUM_IMPL(virDomainDiskBus, NULL, VIR_DOMAIN_DISK_BUS_LAST, "ide", "fdc", @@ -327,7 +327,7 @@ VIR_ENUM_IMPL(virDomainDiskBus, "sd", ); -VIR_ENUM_IMPL(virDomainDiskCache, +VIR_ENUM_IMPL(virDomainDiskCache, NULL, VIR_DOMAIN_DISK_CACHE_LAST, "default", "none", @@ -337,7 +337,7 @@ VIR_ENUM_IMPL(virDomainDiskCache, "unsafe", ); -VIR_ENUM_IMPL(virDomainDiskErrorPolicy, +VIR_ENUM_IMPL(virDomainDiskErrorPolicy, NULL, VIR_DOMAIN_DISK_ERROR_POLICY_LAST, "default", "stop", @@ -346,21 +346,21 @@ VIR_ENUM_IMPL(virDomainDiskErrorPolicy, "enospace", ); -VIR_ENUM_IMPL(virDomainDiskIo, +VIR_ENUM_IMPL(virDomainDiskIo, NULL, VIR_DOMAIN_DISK_IO_LAST, "default", "native", "threads", ); -VIR_ENUM_IMPL(virDomainDeviceSGIO, +VIR_ENUM_IMPL(virDomainDeviceSGIO, NULL, VIR_DOMAIN_DEVICE_SGIO_LAST, "default", "filtered", "unfiltered", ); -VIR_ENUM_IMPL(virDomainController, +VIR_ENUM_IMPL(virDomainController, NULL, VIR_DOMAIN_CONTROLLER_TYPE_LAST, "ide", "fdc", @@ -373,7 +373,7 @@ VIR_ENUM_IMPL(virDomainController, "xenbus", ); -VIR_ENUM_IMPL(virDomainControllerModelPCI, +VIR_ENUM_IMPL(virDomainControllerModelPCI, NULL, VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST, "pci-root", "pcie-root", @@ -387,7 +387,7 @@ VIR_ENUM_IMPL(virDomainControllerModelPCI, "pcie-expander-bus", ); -VIR_ENUM_IMPL(virDomainControllerPCIModelName, +VIR_ENUM_IMPL(virDomainControllerPCIModelName, NULL, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST, "none", "pci-bridge", @@ -402,7 +402,7 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName, "pcie-pci-bridge", ); -VIR_ENUM_IMPL(virDomainControllerModelSCSI, +VIR_ENUM_IMPL(virDomainControllerModelSCSI, NULL, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST, "auto", "buslogic", @@ -416,7 +416,7 @@ VIR_ENUM_IMPL(virDomainControllerModelSCSI, "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainControllerModelUSB, +VIR_ENUM_IMPL(virDomainControllerModelUSB, NULL, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST, "piix3-uhci", "piix4-uhci", @@ -434,21 +434,21 @@ VIR_ENUM_IMPL(virDomainControllerModelUSB, "none", ); -VIR_ENUM_IMPL(virDomainControllerModelIDE, +VIR_ENUM_IMPL(virDomainControllerModelIDE, NULL, VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST, "piix3", "piix4", "ich6", ); -VIR_ENUM_IMPL(virDomainControllerModelVirtioSerial, +VIR_ENUM_IMPL(virDomainControllerModelVirtioSerial, NULL, VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST, "virtio", "virtio-transitional", "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainFS, +VIR_ENUM_IMPL(virDomainFS, NULL, VIR_DOMAIN_FS_TYPE_LAST, "mount", "block", @@ -459,7 +459,7 @@ VIR_ENUM_IMPL(virDomainFS, "volume", ); -VIR_ENUM_IMPL(virDomainFSDriver, +VIR_ENUM_IMPL(virDomainFSDriver, NULL, VIR_DOMAIN_FS_DRIVER_TYPE_LAST, "default", "path", @@ -469,20 +469,20 @@ VIR_ENUM_IMPL(virDomainFSDriver, "ploop", ); -VIR_ENUM_IMPL(virDomainFSAccessMode, +VIR_ENUM_IMPL(virDomainFSAccessMode, NULL, VIR_DOMAIN_FS_ACCESSMODE_LAST, "passthrough", "mapped", "squash", ); -VIR_ENUM_IMPL(virDomainFSWrpolicy, +VIR_ENUM_IMPL(virDomainFSWrpolicy, NULL, VIR_DOMAIN_FS_WRPOLICY_LAST, "default", "immediate", ); -VIR_ENUM_IMPL(virDomainFSModel, +VIR_ENUM_IMPL(virDomainFSModel, NULL, VIR_DOMAIN_FS_MODEL_LAST, "default", "virtio", @@ -490,7 +490,7 @@ VIR_ENUM_IMPL(virDomainFSModel, "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainNet, +VIR_ENUM_IMPL(virDomainNet, NULL, VIR_DOMAIN_NET_TYPE_LAST, "user", "ethernet", @@ -506,35 +506,35 @@ VIR_ENUM_IMPL(virDomainNet, "udp", ); -VIR_ENUM_IMPL(virDomainNetBackend, +VIR_ENUM_IMPL(virDomainNetBackend, NULL, VIR_DOMAIN_NET_BACKEND_TYPE_LAST, "default", "qemu", "vhost", ); -VIR_ENUM_IMPL(virDomainNetVirtioTxMode, +VIR_ENUM_IMPL(virDomainNetVirtioTxMode, NULL, VIR_DOMAIN_NET_VIRTIO_TX_MODE_LAST, "default", "iothread", "timer", ); -VIR_ENUM_IMPL(virDomainNetInterfaceLinkState, +VIR_ENUM_IMPL(virDomainNetInterfaceLinkState, NULL, VIR_DOMAIN_NET_INTERFACE_LINK_STATE_LAST, "default", "up", "down", ); -VIR_ENUM_IMPL(virDomainChrDeviceState, +VIR_ENUM_IMPL(virDomainChrDeviceState, NULL, VIR_DOMAIN_CHR_DEVICE_STATE_LAST, "default", "connected", "disconnected", ); -VIR_ENUM_IMPL(virDomainChrSerialTarget, +VIR_ENUM_IMPL(virDomainChrSerialTarget, NULL, VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST, "none", "isa-serial", @@ -545,7 +545,7 @@ VIR_ENUM_IMPL(virDomainChrSerialTarget, "sclp-serial", ); -VIR_ENUM_IMPL(virDomainChrChannelTarget, +VIR_ENUM_IMPL(virDomainChrChannelTarget, NULL, VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST, "none", "guestfwd", @@ -553,7 +553,7 @@ VIR_ENUM_IMPL(virDomainChrChannelTarget, "xen", ); -VIR_ENUM_IMPL(virDomainChrConsoleTarget, +VIR_ENUM_IMPL(virDomainChrConsoleTarget, NULL, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST, "none", "serial", @@ -566,7 +566,7 @@ VIR_ENUM_IMPL(virDomainChrConsoleTarget, "sclplm", ); -VIR_ENUM_IMPL(virDomainChrSerialTargetModel, +VIR_ENUM_IMPL(virDomainChrSerialTargetModel, NULL, VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST, "none", "isa-serial", @@ -579,7 +579,7 @@ VIR_ENUM_IMPL(virDomainChrSerialTargetModel, "16550a", ); -VIR_ENUM_IMPL(virDomainChrDevice, +VIR_ENUM_IMPL(virDomainChrDevice, NULL, VIR_DOMAIN_CHR_DEVICE_TYPE_LAST, "parallel", "serial", @@ -587,7 +587,7 @@ VIR_ENUM_IMPL(virDomainChrDevice, "channel", ); -VIR_ENUM_IMPL(virDomainChr, +VIR_ENUM_IMPL(virDomainChr, NULL, VIR_DOMAIN_CHR_TYPE_LAST, "null", "vc", @@ -604,7 +604,7 @@ VIR_ENUM_IMPL(virDomainChr, "nmdm", ); -VIR_ENUM_IMPL(virDomainChrTcpProtocol, +VIR_ENUM_IMPL(virDomainChrTcpProtocol, NULL, VIR_DOMAIN_CHR_TCP_PROTOCOL_LAST, "raw", "telnet", @@ -612,28 +612,28 @@ VIR_ENUM_IMPL(virDomainChrTcpProtocol, "tls", ); -VIR_ENUM_IMPL(virDomainChrSpicevmc, +VIR_ENUM_IMPL(virDomainChrSpicevmc, NULL, VIR_DOMAIN_CHR_SPICEVMC_LAST, "vdagent", "smartcard", "usbredir", ); -VIR_ENUM_IMPL(virDomainSmartcard, +VIR_ENUM_IMPL(virDomainSmartcard, NULL, VIR_DOMAIN_SMARTCARD_TYPE_LAST, "host", "host-certificates", "passthrough", ); -VIR_ENUM_IMPL(virDomainSoundCodec, +VIR_ENUM_IMPL(virDomainSoundCodec, NULL, VIR_DOMAIN_SOUND_CODEC_TYPE_LAST, "duplex", "micro", "output", ); -VIR_ENUM_IMPL(virDomainSoundModel, +VIR_ENUM_IMPL(virDomainSoundModel, NULL, VIR_DOMAIN_SOUND_MODEL_LAST, "sb16", "es1370", @@ -644,13 +644,13 @@ VIR_ENUM_IMPL(virDomainSoundModel, "usb", ); -VIR_ENUM_IMPL(virDomainKeyWrapCipherName, +VIR_ENUM_IMPL(virDomainKeyWrapCipherName, NULL, VIR_DOMAIN_KEY_WRAP_CIPHER_NAME_LAST, "aes", "dea", ); -VIR_ENUM_IMPL(virDomainMemballoonModel, +VIR_ENUM_IMPL(virDomainMemballoonModel, NULL, VIR_DOMAIN_MEMBALLOON_MODEL_LAST, "virtio", "xen", @@ -659,7 +659,7 @@ VIR_ENUM_IMPL(virDomainMemballoonModel, "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainSmbiosMode, +VIR_ENUM_IMPL(virDomainSmbiosMode, NULL, VIR_DOMAIN_SMBIOS_LAST, "none", "emulate", @@ -667,14 +667,14 @@ VIR_ENUM_IMPL(virDomainSmbiosMode, "sysinfo", ); -VIR_ENUM_IMPL(virDomainWatchdogModel, +VIR_ENUM_IMPL(virDomainWatchdogModel, NULL, VIR_DOMAIN_WATCHDOG_MODEL_LAST, "i6300esb", "ib700", "diag288", ); -VIR_ENUM_IMPL(virDomainWatchdogAction, +VIR_ENUM_IMPL(virDomainWatchdogAction, NULL, VIR_DOMAIN_WATCHDOG_ACTION_LAST, "reset", "shutdown", @@ -685,7 +685,7 @@ VIR_ENUM_IMPL(virDomainWatchdogAction, "inject-nmi", ); -VIR_ENUM_IMPL(virDomainPanicModel, +VIR_ENUM_IMPL(virDomainPanicModel, NULL, VIR_DOMAIN_PANIC_MODEL_LAST, "default", "isa", @@ -694,7 +694,7 @@ VIR_ENUM_IMPL(virDomainPanicModel, "s390", ); -VIR_ENUM_IMPL(virDomainVideo, +VIR_ENUM_IMPL(virDomainVideo, NULL, VIR_DOMAIN_VIDEO_TYPE_LAST, "default", "vga", @@ -709,14 +709,14 @@ VIR_ENUM_IMPL(virDomainVideo, "none", ); -VIR_ENUM_IMPL(virDomainVideoVGAConf, +VIR_ENUM_IMPL(virDomainVideoVGAConf, NULL, VIR_DOMAIN_VIDEO_VGACONF_LAST, "io", "on", "off", ); -VIR_ENUM_IMPL(virDomainInput, +VIR_ENUM_IMPL(virDomainInput, NULL, VIR_DOMAIN_INPUT_TYPE_LAST, "mouse", "tablet", @@ -724,7 +724,7 @@ VIR_ENUM_IMPL(virDomainInput, "passthrough", ); -VIR_ENUM_IMPL(virDomainInputBus, +VIR_ENUM_IMPL(virDomainInputBus, NULL, VIR_DOMAIN_INPUT_BUS_LAST, "ps2", "usb", @@ -733,7 +733,7 @@ VIR_ENUM_IMPL(virDomainInputBus, "virtio", ); -VIR_ENUM_IMPL(virDomainInputModel, +VIR_ENUM_IMPL(virDomainInputModel, NULL, VIR_DOMAIN_INPUT_MODEL_LAST, "default", "virtio", @@ -741,7 +741,7 @@ VIR_ENUM_IMPL(virDomainInputModel, "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainGraphics, +VIR_ENUM_IMPL(virDomainGraphics, NULL, VIR_DOMAIN_GRAPHICS_TYPE_LAST, "sdl", "vnc", @@ -751,7 +751,7 @@ VIR_ENUM_IMPL(virDomainGraphics, "egl-headless", ); -VIR_ENUM_IMPL(virDomainGraphicsListen, +VIR_ENUM_IMPL(virDomainGraphicsListen, NULL, VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST, "none", "address", @@ -759,7 +759,7 @@ VIR_ENUM_IMPL(virDomainGraphicsListen, "socket", ); -VIR_ENUM_IMPL(virDomainGraphicsAuthConnected, +VIR_ENUM_IMPL(virDomainGraphicsAuthConnected, NULL, VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_LAST, "default", "fail", @@ -767,7 +767,7 @@ VIR_ENUM_IMPL(virDomainGraphicsAuthConnected, "keep", ); -VIR_ENUM_IMPL(virDomainGraphicsVNCSharePolicy, +VIR_ENUM_IMPL(virDomainGraphicsVNCSharePolicy, NULL, VIR_DOMAIN_GRAPHICS_VNC_SHARE_LAST, "default", "allow-exclusive", @@ -775,7 +775,7 @@ VIR_ENUM_IMPL(virDomainGraphicsVNCSharePolicy, "ignore", ); -VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName, +VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName, NULL, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST, "main", "display", @@ -787,14 +787,14 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName, "usbredir", ); -VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelMode, +VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelMode, NULL, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_LAST, "any", "secure", "insecure", ); -VIR_ENUM_IMPL(virDomainGraphicsSpiceImageCompression, +VIR_ENUM_IMPL(virDomainGraphicsSpiceImageCompression, NULL, VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST, "default", "auto_glz", @@ -805,7 +805,7 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceImageCompression, "off", ); -VIR_ENUM_IMPL(virDomainGraphicsSpiceJpegCompression, +VIR_ENUM_IMPL(virDomainGraphicsSpiceJpegCompression, NULL, VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST, "default", "auto", @@ -813,7 +813,7 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceJpegCompression, "always", ); -VIR_ENUM_IMPL(virDomainGraphicsSpiceZlibCompression, +VIR_ENUM_IMPL(virDomainGraphicsSpiceZlibCompression, NULL, VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST, "default", "auto", @@ -821,14 +821,14 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceZlibCompression, "always", ); -VIR_ENUM_IMPL(virDomainGraphicsSpiceMouseMode, +VIR_ENUM_IMPL(virDomainGraphicsSpiceMouseMode, NULL, VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST, "default", "server", "client", ); -VIR_ENUM_IMPL(virDomainGraphicsSpiceStreamingMode, +VIR_ENUM_IMPL(virDomainGraphicsSpiceStreamingMode, NULL, VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_LAST, "default", "filter", @@ -836,13 +836,13 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceStreamingMode, "off", ); -VIR_ENUM_IMPL(virDomainHostdevMode, +VIR_ENUM_IMPL(virDomainHostdevMode, NULL, VIR_DOMAIN_HOSTDEV_MODE_LAST, "subsystem", "capabilities", ); -VIR_ENUM_IMPL(virDomainHostdevSubsys, +VIR_ENUM_IMPL(virDomainHostdevSubsys, NULL, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST, "usb", "pci", @@ -851,7 +851,7 @@ VIR_ENUM_IMPL(virDomainHostdevSubsys, "mdev", ); -VIR_ENUM_IMPL(virDomainHostdevSubsysPCIBackend, +VIR_ENUM_IMPL(virDomainHostdevSubsysPCIBackend, NULL, VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST, "default", "kvm", @@ -859,19 +859,19 @@ VIR_ENUM_IMPL(virDomainHostdevSubsysPCIBackend, "xen", ); -VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIProtocol, +VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIProtocol, NULL, VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_LAST, "adapter", "iscsi", ); -VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIHostProtocol, +VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIHostProtocol, NULL, VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_LAST, "none", "vhost", ); -VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIVHostModel, +VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIVHostModel, NULL, VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_LAST, "default", "virtio", @@ -879,24 +879,24 @@ VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIVHostModel, "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainHostdevCaps, +VIR_ENUM_IMPL(virDomainHostdevCaps, NULL, VIR_DOMAIN_HOSTDEV_CAPS_TYPE_LAST, "storage", "misc", "net", ); -VIR_ENUM_IMPL(virDomainHub, +VIR_ENUM_IMPL(virDomainHub, NULL, VIR_DOMAIN_HUB_TYPE_LAST, "usb", ); -VIR_ENUM_IMPL(virDomainRedirdevBus, +VIR_ENUM_IMPL(virDomainRedirdevBus, NULL, VIR_DOMAIN_REDIRDEV_BUS_LAST, "usb", ); -VIR_ENUM_IMPL(virDomainState, +VIR_ENUM_IMPL(virDomainState, NULL, VIR_DOMAIN_LAST, "nostate", "running", @@ -908,12 +908,12 @@ VIR_ENUM_IMPL(virDomainState, "pmsuspended", ); -VIR_ENUM_IMPL(virDomainNostateReason, +VIR_ENUM_IMPL(virDomainNostateReason, NULL, VIR_DOMAIN_NOSTATE_LAST, "unknown", ); -VIR_ENUM_IMPL(virDomainRunningReason, +VIR_ENUM_IMPL(virDomainRunningReason, NULL, VIR_DOMAIN_RUNNING_LAST, "unknown", "booted", @@ -928,12 +928,12 @@ VIR_ENUM_IMPL(virDomainRunningReason, "post-copy", ); -VIR_ENUM_IMPL(virDomainBlockedReason, +VIR_ENUM_IMPL(virDomainBlockedReason, NULL, VIR_DOMAIN_BLOCKED_LAST, "unknown", ); -VIR_ENUM_IMPL(virDomainPausedReason, +VIR_ENUM_IMPL(virDomainPausedReason, NULL, VIR_DOMAIN_PAUSED_LAST, "unknown", "user", @@ -951,13 +951,13 @@ VIR_ENUM_IMPL(virDomainPausedReason, "post-copy failed", ); -VIR_ENUM_IMPL(virDomainShutdownReason, +VIR_ENUM_IMPL(virDomainShutdownReason, NULL, VIR_DOMAIN_SHUTDOWN_LAST, "unknown", "user", ); -VIR_ENUM_IMPL(virDomainShutoffReason, +VIR_ENUM_IMPL(virDomainShutoffReason, NULL, VIR_DOMAIN_SHUTOFF_LAST, "unknown", "shutdown", @@ -970,18 +970,18 @@ VIR_ENUM_IMPL(virDomainShutoffReason, "daemon", ); -VIR_ENUM_IMPL(virDomainCrashedReason, +VIR_ENUM_IMPL(virDomainCrashedReason, NULL, VIR_DOMAIN_CRASHED_LAST, "unknown", "panicked", ); -VIR_ENUM_IMPL(virDomainPMSuspendedReason, +VIR_ENUM_IMPL(virDomainPMSuspendedReason, NULL, VIR_DOMAIN_PMSUSPENDED_LAST, "unknown", ); -VIR_ENUM_IMPL(virDomainSeclabel, +VIR_ENUM_IMPL(virDomainSeclabel, NULL, VIR_DOMAIN_SECLABEL_LAST, "default", "none", @@ -989,7 +989,7 @@ VIR_ENUM_IMPL(virDomainSeclabel, "static", ); -VIR_ENUM_IMPL(virDomainClockOffset, +VIR_ENUM_IMPL(virDomainClockOffset, NULL, VIR_DOMAIN_CLOCK_OFFSET_LAST, "utc", "localtime", @@ -997,13 +997,13 @@ VIR_ENUM_IMPL(virDomainClockOffset, "timezone", ); -VIR_ENUM_IMPL(virDomainClockBasis, +VIR_ENUM_IMPL(virDomainClockBasis, NULL, VIR_DOMAIN_CLOCK_BASIS_LAST, "utc", "localtime", ); -VIR_ENUM_IMPL(virDomainTimerName, +VIR_ENUM_IMPL(virDomainTimerName, NULL, VIR_DOMAIN_TIMER_NAME_LAST, "platform", "pit", @@ -1014,14 +1014,14 @@ VIR_ENUM_IMPL(virDomainTimerName, "hypervclock", ); -VIR_ENUM_IMPL(virDomainTimerTrack, +VIR_ENUM_IMPL(virDomainTimerTrack, NULL, VIR_DOMAIN_TIMER_TRACK_LAST, "boot", "guest", "wall", ); -VIR_ENUM_IMPL(virDomainTimerTickpolicy, +VIR_ENUM_IMPL(virDomainTimerTickpolicy, NULL, VIR_DOMAIN_TIMER_TICKPOLICY_LAST, "delay", "catchup", @@ -1029,7 +1029,7 @@ VIR_ENUM_IMPL(virDomainTimerTickpolicy, "discard", ); -VIR_ENUM_IMPL(virDomainTimerMode, +VIR_ENUM_IMPL(virDomainTimerMode, NULL, VIR_DOMAIN_TIMER_MODE_LAST, "auto", "native", @@ -1038,7 +1038,7 @@ VIR_ENUM_IMPL(virDomainTimerMode, "smpsafe", ); -VIR_ENUM_IMPL(virDomainStartupPolicy, +VIR_ENUM_IMPL(virDomainStartupPolicy, NULL, VIR_DOMAIN_STARTUP_POLICY_LAST, "default", "mandatory", @@ -1046,56 +1046,56 @@ VIR_ENUM_IMPL(virDomainStartupPolicy, "optional", ); -VIR_ENUM_IMPL(virDomainCpuPlacementMode, +VIR_ENUM_IMPL(virDomainCpuPlacementMode, NULL, VIR_DOMAIN_CPU_PLACEMENT_MODE_LAST, "static", "auto", ); -VIR_ENUM_IMPL(virDomainDiskTray, +VIR_ENUM_IMPL(virDomainDiskTray, NULL, VIR_DOMAIN_DISK_TRAY_LAST, "closed", "open", ); -VIR_ENUM_IMPL(virDomainRNGModel, +VIR_ENUM_IMPL(virDomainRNGModel, NULL, VIR_DOMAIN_RNG_MODEL_LAST, "virtio", "virtio-transitional", "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainRNGBackend, +VIR_ENUM_IMPL(virDomainRNGBackend, NULL, VIR_DOMAIN_RNG_BACKEND_LAST, "random", "egd", ); -VIR_ENUM_IMPL(virDomainTPMModel, +VIR_ENUM_IMPL(virDomainTPMModel, NULL, VIR_DOMAIN_TPM_MODEL_LAST, "tpm-tis", "tpm-crb", ); -VIR_ENUM_IMPL(virDomainTPMBackend, +VIR_ENUM_IMPL(virDomainTPMBackend, NULL, VIR_DOMAIN_TPM_TYPE_LAST, "passthrough", "emulator", ); -VIR_ENUM_IMPL(virDomainTPMVersion, +VIR_ENUM_IMPL(virDomainTPMVersion, NULL, VIR_DOMAIN_TPM_VERSION_LAST, "default", "1.2", "2.0", ); -VIR_ENUM_IMPL(virDomainIOMMUModel, +VIR_ENUM_IMPL(virDomainIOMMUModel, NULL, VIR_DOMAIN_IOMMU_MODEL_LAST, "intel", ); -VIR_ENUM_IMPL(virDomainVsockModel, +VIR_ENUM_IMPL(virDomainVsockModel, NULL, VIR_DOMAIN_VSOCK_MODEL_LAST, "default", "virtio", @@ -1103,14 +1103,14 @@ VIR_ENUM_IMPL(virDomainVsockModel, "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainDiskDiscard, +VIR_ENUM_IMPL(virDomainDiskDiscard, NULL, VIR_DOMAIN_DISK_DISCARD_LAST, "default", "unmap", "ignore", ); -VIR_ENUM_IMPL(virDomainDiskDetectZeroes, +VIR_ENUM_IMPL(virDomainDiskDetectZeroes, NULL, VIR_DOMAIN_DISK_DETECT_ZEROES_LAST, "default", "off", @@ -1118,7 +1118,7 @@ VIR_ENUM_IMPL(virDomainDiskDetectZeroes, "unmap", ); -VIR_ENUM_IMPL(virDomainDiskModel, +VIR_ENUM_IMPL(virDomainDiskModel, NULL, VIR_DOMAIN_DISK_MODEL_LAST, "default", "virtio", @@ -1126,7 +1126,7 @@ VIR_ENUM_IMPL(virDomainDiskModel, "virtio-non-transitional", ); -VIR_ENUM_IMPL(virDomainDiskMirrorState, +VIR_ENUM_IMPL(virDomainDiskMirrorState, NULL, VIR_DOMAIN_DISK_MIRROR_STATE_LAST, "none", "yes", @@ -1134,7 +1134,7 @@ VIR_ENUM_IMPL(virDomainDiskMirrorState, "pivot", ); -VIR_ENUM_IMPL(virDomainMemorySource, +VIR_ENUM_IMPL(virDomainMemorySource, NULL, VIR_DOMAIN_MEMORY_SOURCE_LAST, "none", "file", @@ -1142,28 +1142,28 @@ VIR_ENUM_IMPL(virDomainMemorySource, "memfd", ); -VIR_ENUM_IMPL(virDomainMemoryAllocation, +VIR_ENUM_IMPL(virDomainMemoryAllocation, NULL, VIR_DOMAIN_MEMORY_ALLOCATION_LAST, "none", "immediate", "ondemand", ); -VIR_ENUM_IMPL(virDomainLoader, +VIR_ENUM_IMPL(virDomainLoader, NULL, VIR_DOMAIN_LOADER_TYPE_LAST, "none", "rom", "pflash", ); -VIR_ENUM_IMPL(virDomainIOAPIC, +VIR_ENUM_IMPL(virDomainIOAPIC, NULL, VIR_DOMAIN_IOAPIC_LAST, "none", "qemu", "kvm", ); -VIR_ENUM_IMPL(virDomainHPTResizing, +VIR_ENUM_IMPL(virDomainHPTResizing, NULL, VIR_DOMAIN_HPT_RESIZING_LAST, "none", "enabled", @@ -1171,7 +1171,7 @@ VIR_ENUM_IMPL(virDomainHPTResizing, "required", ); -VIR_ENUM_IMPL(virDomainOsDefFirmware, +VIR_ENUM_IMPL(virDomainOsDefFirmware, NULL, VIR_DOMAIN_OS_DEF_FIRMWARE_LAST, "none", "bios", @@ -1181,26 +1181,26 @@ VIR_ENUM_IMPL(virDomainOsDefFirmware, /* Internal mapping: subset of block job types that can be present in * XML (remaining types are not two-phase). */ VIR_ENUM_DECL(virDomainBlockJob); -VIR_ENUM_IMPL(virDomainBlockJob, +VIR_ENUM_IMPL(virDomainBlockJob, NULL, VIR_DOMAIN_BLOCK_JOB_TYPE_LAST, "", "", "copy", "", "active-commit", ); -VIR_ENUM_IMPL(virDomainMemoryModel, +VIR_ENUM_IMPL(virDomainMemoryModel, NULL, VIR_DOMAIN_MEMORY_MODEL_LAST, "", "dimm", "nvdimm", ); -VIR_ENUM_IMPL(virDomainShmemModel, +VIR_ENUM_IMPL(virDomainShmemModel, NULL, VIR_DOMAIN_SHMEM_MODEL_LAST, "ivshmem", "ivshmem-plain", "ivshmem-doorbell", ); -VIR_ENUM_IMPL(virDomainLaunchSecurity, +VIR_ENUM_IMPL(virDomainLaunchSecurity, NULL, VIR_DOMAIN_LAUNCH_SECURITY_LAST, "", "sev", diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index b134ff4adc..bcaf90ed24 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -31,7 +31,7 @@ #define VIR_FROM_THIS VIR_FROM_INTERFACE -VIR_ENUM_IMPL(virInterface, +VIR_ENUM_IMPL(virInterface, NULL, VIR_INTERFACE_TYPE_LAST, "ethernet", "bridge", "bond", "vlan", ); diff --git a/src/conf/netdev_vlan_conf.c b/src/conf/netdev_vlan_conf.c index 516129280d..28484b32cb 100644 --- a/src/conf/netdev_vlan_conf.c +++ b/src/conf/netdev_vlan_conf.c @@ -24,7 +24,7 @@ #define VIR_FROM_THIS VIR_FROM_NONE -VIR_ENUM_IMPL(virNativeVlanMode, +VIR_ENUM_IMPL(virNativeVlanMode, NULL, VIR_NATIVE_VLAN_MODE_LAST, "default", "tagged", "untagged", ); diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 78bff6f687..8e1a7d3fea 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -43,32 +43,32 @@ #define VIR_FROM_THIS VIR_FROM_NETWORK -VIR_ENUM_IMPL(virNetworkForward, +VIR_ENUM_IMPL(virNetworkForward, NULL, VIR_NETWORK_FORWARD_LAST, "none", "nat", "route", "open", "bridge", "private", "vepa", "passthrough", "hostdev", ); -VIR_ENUM_IMPL(virNetworkBridgeMACTableManager, +VIR_ENUM_IMPL(virNetworkBridgeMACTableManager, NULL, VIR_NETWORK_BRIDGE_MAC_TABLE_MANAGER_LAST, "default", "kernel", "libvirt", ); VIR_ENUM_DECL(virNetworkForwardHostdevDevice); -VIR_ENUM_IMPL(virNetworkForwardHostdevDevice, +VIR_ENUM_IMPL(virNetworkForwardHostdevDevice, NULL, VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_LAST, "none", "pci", "netdev", ); -VIR_ENUM_IMPL(virNetworkForwardDriverName, +VIR_ENUM_IMPL(virNetworkForwardDriverName, NULL, VIR_NETWORK_FORWARD_DRIVER_NAME_LAST, "default", "kvm", "vfio", ); -VIR_ENUM_IMPL(virNetworkTaint, +VIR_ENUM_IMPL(virNetworkTaint, NULL, VIR_NETWORK_TAINT_LAST, "hook-script", ); diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 1db045d9ac..25708b8ccf 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -42,13 +42,13 @@ VIR_LOG_INIT("conf.node_device_conf"); -VIR_ENUM_IMPL(virNodeDevDevnode, +VIR_ENUM_IMPL(virNodeDevDevnode, NULL, VIR_NODE_DEV_DEVNODE_LAST, "dev", "link", ); -VIR_ENUM_IMPL(virNodeDevCap, +VIR_ENUM_IMPL(virNodeDevCap, NULL, VIR_NODE_DEV_CAP_LAST, "system", "pci", @@ -68,13 +68,13 @@ VIR_ENUM_IMPL(virNodeDevCap, "ccw", ); -VIR_ENUM_IMPL(virNodeDevNetCap, +VIR_ENUM_IMPL(virNodeDevNetCap, NULL, VIR_NODE_DEV_CAP_NET_LAST, "80203", "80211", ); -VIR_ENUM_IMPL(virNodeDevDRM, +VIR_ENUM_IMPL(virNodeDevDRM, NULL, VIR_NODE_DEV_DRM_LAST, "primary", "control", diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 6720d5620d..5529dde03a 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -38,21 +38,21 @@ #define VIR_FROM_THIS VIR_FROM_DOMAIN -VIR_ENUM_IMPL(virDomainNumatuneMemMode, +VIR_ENUM_IMPL(virDomainNumatuneMemMode, NULL, VIR_DOMAIN_NUMATUNE_MEM_LAST, "strict", "preferred", "interleave", ); -VIR_ENUM_IMPL(virDomainNumatunePlacement, +VIR_ENUM_IMPL(virDomainNumatunePlacement, NULL, VIR_DOMAIN_NUMATUNE_PLACEMENT_LAST, "default", "static", "auto", ); -VIR_ENUM_IMPL(virDomainMemoryAccess, +VIR_ENUM_IMPL(virDomainMemoryAccess, NULL, VIR_DOMAIN_MEMORY_ACCESS_LAST, "default", "shared", diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index cecee51d87..e8329fea6d 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -49,7 +49,7 @@ #define VIR_FROM_THIS VIR_FROM_NWFILTER -VIR_ENUM_IMPL(virNWFilterRuleAction, +VIR_ENUM_IMPL(virNWFilterRuleAction, NULL, VIR_NWFILTER_RULE_ACTION_LAST, "drop", "accept", @@ -58,7 +58,7 @@ VIR_ENUM_IMPL(virNWFilterRuleAction, "continue", ); -VIR_ENUM_IMPL(virNWFilterJumpTarget, +VIR_ENUM_IMPL(virNWFilterJumpTarget, NULL, VIR_NWFILTER_RULE_ACTION_LAST, "DROP", "ACCEPT", @@ -67,27 +67,27 @@ VIR_ENUM_IMPL(virNWFilterJumpTarget, "CONTINUE", ); -VIR_ENUM_IMPL(virNWFilterRuleDirection, +VIR_ENUM_IMPL(virNWFilterRuleDirection, NULL, VIR_NWFILTER_RULE_DIRECTION_LAST, "in", "out", "inout", ); -VIR_ENUM_IMPL(virNWFilterChainPolicy, +VIR_ENUM_IMPL(virNWFilterChainPolicy, NULL, VIR_NWFILTER_CHAIN_POLICY_LAST, "ACCEPT", "DROP", ); -VIR_ENUM_IMPL(virNWFilterEbtablesTable, +VIR_ENUM_IMPL(virNWFilterEbtablesTable, NULL, VIR_NWFILTER_EBTABLES_TABLE_LAST, "filter", "nat", "broute", ); -VIR_ENUM_IMPL(virNWFilterChainSuffix, +VIR_ENUM_IMPL(virNWFilterChainSuffix, NULL, VIR_NWFILTER_CHAINSUFFIX_LAST, "root", "mac", @@ -99,7 +99,7 @@ VIR_ENUM_IMPL(virNWFilterChainSuffix, "ipv6", ); -VIR_ENUM_IMPL(virNWFilterRuleProtocol, +VIR_ENUM_IMPL(virNWFilterRuleProtocol, NULL, VIR_NWFILTER_RULE_PROTOCOL_LAST, "none", "mac", diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index ce543cbaf7..f38dff2a06 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -51,7 +51,7 @@ VIR_LOG_INIT("conf.snapshot_conf"); -VIR_ENUM_IMPL(virDomainSnapshotLocation, +VIR_ENUM_IMPL(virDomainSnapshotLocation, NULL, VIR_DOMAIN_SNAPSHOT_LOCATION_LAST, "default", "no", @@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virDomainSnapshotLocation, ); /* virDomainSnapshotState is really virDomainState plus one extra state */ -VIR_ENUM_IMPL(virDomainSnapshotState, +VIR_ENUM_IMPL(virDomainSnapshotState, NULL, VIR_DOMAIN_SNAPSHOT_LAST, "nostate", "running", diff --git a/src/conf/storage_adapter_conf.c b/src/conf/storage_adapter_conf.c index 18bcb5eb9e..9673a58db0 100644 --- a/src/conf/storage_adapter_conf.c +++ b/src/conf/storage_adapter_conf.c @@ -32,7 +32,7 @@ VIR_LOG_INIT("conf.storage_adapter_conf"); -VIR_ENUM_IMPL(virStorageAdapter, +VIR_ENUM_IMPL(virStorageAdapter, NULL, VIR_STORAGE_ADAPTER_TYPE_LAST, "default", "scsi_host", "fc_host", ); diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 3ae0d7ab77..23fbd9f31c 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -47,13 +47,13 @@ VIR_LOG_INIT("conf.storage_conf"); -VIR_ENUM_IMPL(virStorageVol, +VIR_ENUM_IMPL(virStorageVol, NULL, VIR_STORAGE_VOL_LAST, "file", "block", "dir", "network", "netdir", "ploop", ); -VIR_ENUM_IMPL(virStoragePool, +VIR_ENUM_IMPL(virStoragePool, NULL, VIR_STORAGE_POOL_LAST, "dir", "fs", "netfs", "logical", "disk", "iscsi", @@ -62,31 +62,31 @@ VIR_ENUM_IMPL(virStoragePool, "zfs", "vstorage", ); -VIR_ENUM_IMPL(virStoragePoolFormatFileSystem, +VIR_ENUM_IMPL(virStoragePoolFormatFileSystem, NULL, VIR_STORAGE_POOL_FS_LAST, "auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf", "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2", ); -VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, +VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, NULL, VIR_STORAGE_POOL_NETFS_LAST, "auto", "nfs", "glusterfs", "cifs", ); -VIR_ENUM_IMPL(virStoragePoolFormatDisk, +VIR_ENUM_IMPL(virStoragePoolFormatDisk, NULL, VIR_STORAGE_POOL_DISK_LAST, "unknown", "dos", "dvh", "gpt", "mac", "bsd", "pc98", "sun", "lvm2", ); -VIR_ENUM_IMPL(virStoragePoolFormatLogical, +VIR_ENUM_IMPL(virStoragePoolFormatLogical, NULL, VIR_STORAGE_POOL_LOGICAL_LAST, "unknown", "lvm2", ); -VIR_ENUM_IMPL(virStorageVolFormatDisk, +VIR_ENUM_IMPL(virStorageVolFormatDisk, NULL, VIR_STORAGE_VOL_DISK_LAST, "none", "linux", "fat16", "fat32", "linux-swap", @@ -94,12 +94,12 @@ VIR_ENUM_IMPL(virStorageVolFormatDisk, "extended", ); -VIR_ENUM_IMPL(virStorageVolDefRefreshAllocation, +VIR_ENUM_IMPL(virStorageVolDefRefreshAllocation, NULL, VIR_STORAGE_VOL_DEF_REFRESH_ALLOCATION_LAST, "default", "capacity", ); -VIR_ENUM_IMPL(virStoragePartedFs, +VIR_ENUM_IMPL(virStoragePartedFs, NULL, VIR_STORAGE_PARTED_FS_TYPE_LAST, "ext2", "ext2", "fat16", "fat32", "linux-swap", diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 6e4bf68921..a52d8ed5ce 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -40,7 +40,7 @@ VIR_LOG_INIT("libxl.libxl_domain"); -VIR_ENUM_IMPL(libxlDomainJob, +VIR_ENUM_IMPL(libxlDomainJob, NULL, LIBXL_JOB_LAST, "none", "query", diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index d714ddd2dd..0bcdb75c4a 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -85,7 +85,7 @@ enum { }; VIR_ENUM_DECL(virDaemonErr); -VIR_ENUM_IMPL(virDaemonErr, +VIR_ENUM_IMPL(virDaemonErr, NULL, VIR_LOCK_DAEMON_ERR_LAST, "Initialization successful", "Unable to obtain pidfile", diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index 3469d87caa..fff186db36 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -81,7 +81,7 @@ enum { }; VIR_ENUM_DECL(virDaemonErr); -VIR_ENUM_IMPL(virDaemonErr, +VIR_ENUM_IMPL(virDaemonErr, NULL, VIR_LOG_DAEMON_ERR_LAST, "Initialization successful", "Unable to obtain pidfile", diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c index 51a9fd36eb..ea08bc2427 100644 --- a/src/lxc/lxc_domain.c +++ b/src/lxc/lxc_domain.c @@ -37,7 +37,7 @@ #define VIR_FROM_THIS VIR_FROM_LXC #define LXC_NAMESPACE_HREF "http://libvirt.org/schemas/domain/lxc/1.0" -VIR_ENUM_IMPL(virLXCDomainJob, +VIR_ENUM_IMPL(virLXCDomainJob, NULL, LXC_JOB_LAST, "none", "query", @@ -181,14 +181,14 @@ virLXCDomainObjPrivateFree(void *data) -VIR_ENUM_IMPL(virLXCDomainNamespace, +VIR_ENUM_IMPL(virLXCDomainNamespace, NULL, VIR_LXC_DOMAIN_NAMESPACE_LAST, "sharenet", "shareipc", "shareuts", ); -VIR_ENUM_IMPL(virLXCDomainNamespaceSource, +VIR_ENUM_IMPL(virLXCDomainNamespaceSource, NULL, VIR_LXC_DOMAIN_NAMESPACE_SOURCE_LAST, "none", "name", diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index b4c6e790d8..766ca3d3de 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -35,7 +35,7 @@ VIR_LOG_INIT("lxc.lxc_native"); -VIR_ENUM_IMPL(virLXCNetworkConfigEntry, +VIR_ENUM_IMPL(virLXCNetworkConfigEntry, NULL, VIR_LXC_NETWORK_CONFIG_LAST, "name", "type", diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index 89d9a003e2..c2ffa06cf1 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -73,7 +73,7 @@ enum virLeaseActionFlags { VIR_ENUM_DECL(virLeaseAction); -VIR_ENUM_IMPL(virLeaseAction, +VIR_ENUM_IMPL(virLeaseAction, NULL, VIR_LEASE_ACTION_LAST, "add", "old", "del", "init", ); diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 361db299a5..9a3f09718d 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -1215,7 +1215,7 @@ void qemuAgentNotifyEvent(qemuAgentPtr mon, VIR_ENUM_DECL(qemuAgentShutdownMode); -VIR_ENUM_IMPL(qemuAgentShutdownMode, +VIR_ENUM_IMPL(qemuAgentShutdownMode, NULL, QEMU_AGENT_SHUTDOWN_LAST, "powerdown", "reboot", "halt", ); @@ -1335,7 +1335,7 @@ int qemuAgentFSThaw(qemuAgentPtr mon) VIR_ENUM_DECL(qemuAgentSuspendMode); -VIR_ENUM_IMPL(qemuAgentSuspendMode, +VIR_ENUM_IMPL(qemuAgentSuspendMode, NULL, VIR_NODE_SUSPEND_TARGET_LAST, "guest-suspend-ram", "guest-suspend-disk", diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f8ea66b577..9eb5e418cc 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -63,7 +63,7 @@ VIR_LOG_INIT("qemu.qemu_capabilities"); * are used in domain status files which are read on * daemon restarts */ -VIR_ENUM_IMPL(virQEMUCaps, +VIR_ENUM_IMPL(virQEMUCaps, NULL, QEMU_CAPS_LAST, /* virQEMUCaps grouping marker */ /* 0 */ "vnc-colon", diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2acc0b56ea..3b4e99e865 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -72,7 +72,7 @@ VIR_LOG_INIT("qemu.qemu_command"); VIR_ENUM_DECL(virDomainDiskQEMUBus); -VIR_ENUM_IMPL(virDomainDiskQEMUBus, +VIR_ENUM_IMPL(virDomainDiskQEMUBus, NULL, VIR_DOMAIN_DISK_BUS_LAST, "ide", "floppy", @@ -88,7 +88,7 @@ VIR_ENUM_IMPL(virDomainDiskQEMUBus, VIR_ENUM_DECL(qemuDiskCacheV2); -VIR_ENUM_IMPL(qemuDiskCacheV2, +VIR_ENUM_IMPL(qemuDiskCacheV2, NULL, VIR_DOMAIN_DISK_CACHE_LAST, "default", "none", @@ -98,7 +98,7 @@ VIR_ENUM_IMPL(qemuDiskCacheV2, "unsafe", ); -VIR_ENUM_IMPL(qemuVideo, +VIR_ENUM_IMPL(qemuVideo, NULL, VIR_DOMAIN_VIDEO_TYPE_LAST, "", /* default value, we shouldn't see this */ "std", @@ -115,7 +115,7 @@ VIR_ENUM_IMPL(qemuVideo, VIR_ENUM_DECL(qemuDeviceVideo); -VIR_ENUM_IMPL(qemuDeviceVideo, +VIR_ENUM_IMPL(qemuDeviceVideo, NULL, VIR_DOMAIN_VIDEO_TYPE_LAST, "", /* default value, we shouldn't see this */ "VGA", @@ -132,7 +132,7 @@ VIR_ENUM_IMPL(qemuDeviceVideo, VIR_ENUM_DECL(qemuDeviceVideoSecondary); -VIR_ENUM_IMPL(qemuDeviceVideoSecondary, +VIR_ENUM_IMPL(qemuDeviceVideoSecondary, NULL, VIR_DOMAIN_VIDEO_TYPE_LAST, "", /* default value, we shouldn't see this */ "", /* no secondary device for VGA */ @@ -149,7 +149,7 @@ VIR_ENUM_IMPL(qemuDeviceVideoSecondary, VIR_ENUM_DECL(qemuSoundCodec); -VIR_ENUM_IMPL(qemuSoundCodec, +VIR_ENUM_IMPL(qemuSoundCodec, NULL, VIR_DOMAIN_SOUND_CODEC_TYPE_LAST, "hda-duplex", "hda-micro", @@ -158,7 +158,7 @@ VIR_ENUM_IMPL(qemuSoundCodec, VIR_ENUM_DECL(qemuControllerModelUSB); -VIR_ENUM_IMPL(qemuControllerModelUSB, +VIR_ENUM_IMPL(qemuControllerModelUSB, NULL, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST, "piix3-usb-uhci", "piix4-usb-uhci", @@ -177,7 +177,7 @@ VIR_ENUM_IMPL(qemuControllerModelUSB, ); VIR_ENUM_DECL(qemuDomainFSDriver); -VIR_ENUM_IMPL(qemuDomainFSDriver, +VIR_ENUM_IMPL(qemuDomainFSDriver, NULL, VIR_DOMAIN_FS_DRIVER_TYPE_LAST, "local", "local", @@ -188,7 +188,7 @@ VIR_ENUM_IMPL(qemuDomainFSDriver, ); VIR_ENUM_DECL(qemuNumaPolicy); -VIR_ENUM_IMPL(qemuNumaPolicy, +VIR_ENUM_IMPL(qemuNumaPolicy, NULL, VIR_DOMAIN_NUMATUNE_MEM_LAST, "bind", "preferred", diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 38fa16bc5f..c42869a289 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -80,7 +80,7 @@ VIR_LOG_INIT("qemu.qemu_domain"); #define QEMU_NAMESPACE_HREF "http://libvirt.org/schemas/domain/qemu/1.0" -VIR_ENUM_IMPL(qemuDomainJob, +VIR_ENUM_IMPL(qemuDomainJob, NULL, QEMU_JOB_LAST, "none", "query", @@ -93,14 +93,14 @@ VIR_ENUM_IMPL(qemuDomainJob, "async nested", ); -VIR_ENUM_IMPL(qemuDomainAgentJob, +VIR_ENUM_IMPL(qemuDomainAgentJob, NULL, QEMU_AGENT_JOB_LAST, "none", "query", "modify", ); -VIR_ENUM_IMPL(qemuDomainAsyncJob, +VIR_ENUM_IMPL(qemuDomainAsyncJob, NULL, QEMU_ASYNC_JOB_LAST, "none", "migration out", @@ -111,7 +111,7 @@ VIR_ENUM_IMPL(qemuDomainAsyncJob, "start", ); -VIR_ENUM_IMPL(qemuDomainNamespace, +VIR_ENUM_IMPL(qemuDomainNamespace, NULL, QEMU_DOMAIN_NS_LAST, "mount", ); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4510b0ce60..0bde8a39aa 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2708,7 +2708,7 @@ typedef enum { } virQEMUSaveFormat; VIR_ENUM_DECL(qemuSaveCompression); -VIR_ENUM_IMPL(qemuSaveCompression, +VIR_ENUM_IMPL(qemuSaveCompression, NULL, QEMU_SAVE_FORMAT_LAST, "raw", "gzip", @@ -2718,7 +2718,7 @@ VIR_ENUM_IMPL(qemuSaveCompression, ); VIR_ENUM_DECL(qemuDumpFormat); -VIR_ENUM_IMPL(qemuDumpFormat, +VIR_ENUM_IMPL(qemuDumpFormat, NULL, VIR_DOMAIN_CORE_DUMP_FORMAT_LAST, "elf", "kdump-zlib", diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index f3d89d000d..4e0c2bbbae 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -52,7 +52,7 @@ typedef enum { } qemuFirmwareOSInterface; VIR_ENUM_DECL(qemuFirmwareOSInterface); -VIR_ENUM_IMPL(qemuFirmwareOSInterface, +VIR_ENUM_IMPL(qemuFirmwareOSInterface, NULL, QEMU_FIRMWARE_OS_INTERFACE_LAST, "", "bios", @@ -102,7 +102,7 @@ typedef enum { } qemuFirmwareDevice; VIR_ENUM_DECL(qemuFirmwareDevice); -VIR_ENUM_IMPL(qemuFirmwareDevice, +VIR_ENUM_IMPL(qemuFirmwareDevice, NULL, QEMU_FIRMWARE_DEVICE_LAST, "", "flash", @@ -148,7 +148,7 @@ typedef enum { } qemuFirmwareFeature; VIR_ENUM_DECL(qemuFirmwareFeature); -VIR_ENUM_IMPL(qemuFirmwareFeature, +VIR_ENUM_IMPL(qemuFirmwareFeature, NULL, QEMU_FIRMWARE_FEATURE_LAST, "", "acpi-s3", diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index e3ad4e52a7..08aa40d374 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -66,7 +66,7 @@ VIR_LOG_INIT("qemu.qemu_migration"); -VIR_ENUM_IMPL(qemuMigrationJobPhase, +VIR_ENUM_IMPL(qemuMigrationJobPhase, NULL, QEMU_MIGRATION_PHASE_LAST, "none", "perform2", diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 74b8575a91..e1b3ef571b 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -38,7 +38,7 @@ VIR_LOG_INIT("qemu.qemu_migration_cookie"); -VIR_ENUM_IMPL(qemuMigrationCookieFlag, +VIR_ENUM_IMPL(qemuMigrationCookieFlag, NULL, QEMU_MIGRATION_COOKIE_FLAG_LAST, "graphics", "lockstate", diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index e296fc1927..54707d57f7 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -72,13 +72,13 @@ typedef enum { QEMU_MIGRATION_COMPRESS_LAST } qemuMigrationCompressMethod; VIR_ENUM_DECL(qemuMigrationCompressMethod); -VIR_ENUM_IMPL(qemuMigrationCompressMethod, +VIR_ENUM_IMPL(qemuMigrationCompressMethod, NULL, QEMU_MIGRATION_COMPRESS_LAST, "xbzrle", "mt", ); -VIR_ENUM_IMPL(qemuMigrationCapability, +VIR_ENUM_IMPL(qemuMigrationCapability, NULL, QEMU_MIGRATION_CAP_LAST, "xbzrle", "auto-converge", @@ -93,7 +93,7 @@ VIR_ENUM_IMPL(qemuMigrationCapability, VIR_ENUM_DECL(qemuMigrationParam); -VIR_ENUM_IMPL(qemuMigrationParam, +VIR_ENUM_IMPL(qemuMigrationParam, NULL, QEMU_MIGRATION_PARAM_LAST, "compress-level", "compress-threads", diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index babcbde878..250302d3d6 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -168,7 +168,7 @@ static int qemuMonitorOnceInit(void) VIR_ONCE_GLOBAL_INIT(qemuMonitor); -VIR_ENUM_IMPL(qemuMonitorMigrationStatus, +VIR_ENUM_IMPL(qemuMonitorMigrationStatus, NULL, QEMU_MONITOR_MIGRATION_STATUS_LAST, "inactive", "setup", "active", "pre-switchover", @@ -177,7 +177,7 @@ VIR_ENUM_IMPL(qemuMonitorMigrationStatus, "cancelling", "cancelled", ); -VIR_ENUM_IMPL(qemuMonitorVMStatus, +VIR_ENUM_IMPL(qemuMonitorVMStatus, NULL, QEMU_MONITOR_VM_STATUS_LAST, "debug", "inmigrate", "internal-error", "io-error", "paused", "postmigrate", "prelaunch", "finish-migrate", "restore-vm", @@ -194,12 +194,12 @@ typedef enum { VIR_ENUM_DECL(qemuMonitorBlockIOStatus); -VIR_ENUM_IMPL(qemuMonitorBlockIOStatus, +VIR_ENUM_IMPL(qemuMonitorBlockIOStatus, NULL, QEMU_MONITOR_BLOCK_IO_STATUS_LAST, "ok", "failed", "nospace", ); -VIR_ENUM_IMPL(qemuMonitorDumpStatus, +VIR_ENUM_IMPL(qemuMonitorDumpStatus, NULL, QEMU_MONITOR_DUMP_STATUS_LAST, "none", "active", "completed", "failed", ); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 71c452b25b..6ec4e6bd1b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -733,7 +733,7 @@ static void qemuMonitorJSONHandleRTCChange(qemuMonitorPtr mon, virJSONValuePtr d } VIR_ENUM_DECL(qemuMonitorWatchdogAction); -VIR_ENUM_IMPL(qemuMonitorWatchdogAction, +VIR_ENUM_IMPL(qemuMonitorWatchdogAction, NULL, VIR_DOMAIN_EVENT_WATCHDOG_LAST, "none", "pause", "reset", "poweroff", "shutdown", "debug", "inject-nmi", ); @@ -756,7 +756,7 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitorPtr mon, virJSONValuePtr da } VIR_ENUM_DECL(qemuMonitorIOErrorAction); -VIR_ENUM_IMPL(qemuMonitorIOErrorAction, +VIR_ENUM_IMPL(qemuMonitorIOErrorAction, NULL, VIR_DOMAIN_EVENT_IO_ERROR_LAST, "ignore", "stop", "report", ); @@ -799,7 +799,7 @@ qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr data) VIR_ENUM_DECL(qemuMonitorGraphicsAddressFamily); -VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, +VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, NULL, VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST, "ipv4", "ipv6", "unix", ); @@ -5466,7 +5466,7 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon, } -VIR_ENUM_IMPL(qemuMonitorCPUProperty, +VIR_ENUM_IMPL(qemuMonitorCPUProperty, NULL, QEMU_MONITOR_CPU_PROPERTY_LAST, "boolean", "string", "number", ); diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index c3782971f1..f838c668b7 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -90,7 +90,7 @@ enum { }; VIR_ENUM_DECL(virDaemonErr); -VIR_ENUM_IMPL(virDaemonErr, +VIR_ENUM_IMPL(virDaemonErr, NULL, VIR_DAEMON_ERR_LAST, "Initialization successful", "Unable to obtain pidfile", diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 4238d7014b..edb343044d 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -62,7 +62,7 @@ VIR_LOG_INIT("util.cgroup"); #define CGROUP_NB_TOTAL_CPU_STAT_PARAM 3 #define CGROUP_NB_PER_CPU_STAT_PARAM 1 -VIR_ENUM_IMPL(virCgroupController, +VIR_ENUM_IMPL(virCgroupController, NULL, VIR_CGROUP_CONTROLLER_LAST, "cpu", "cpuacct", "cpuset", "memory", "devices", "freezer", "blkio", "net_cls", "perf_event", diff --git a/src/util/vircgroupbackend.c b/src/util/vircgroupbackend.c index d56e4ea292..362c014093 100644 --- a/src/util/vircgroupbackend.c +++ b/src/util/vircgroupbackend.c @@ -30,7 +30,7 @@ #define VIR_FROM_THIS VIR_FROM_CGROUP VIR_ENUM_DECL(virCgroupBackend); -VIR_ENUM_IMPL(virCgroupBackend, +VIR_ENUM_IMPL(virCgroupBackend, NULL, VIR_CGROUP_BACKEND_TYPE_LAST, "cgroup V2", "cgroup V1", diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c index 8ce10d3608..d930b04ac1 100644 --- a/src/util/vircgroupv1.c +++ b/src/util/vircgroupv1.c @@ -47,7 +47,7 @@ VIR_LOG_INIT("util.cgroup"); VIR_ENUM_DECL(virCgroupV1Controller); -VIR_ENUM_IMPL(virCgroupV1Controller, +VIR_ENUM_IMPL(virCgroupV1Controller, NULL, VIR_CGROUP_CONTROLLER_LAST, "cpu", "cpuacct", "cpuset", "memory", "devices", "freezer", "blkio", "net_cls", "perf_event", diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 0cfbc96264..5e421da4ae 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -44,7 +44,7 @@ VIR_LOG_INIT("util.cgroup"); #define VIR_FROM_THIS VIR_FROM_CGROUP VIR_ENUM_DECL(virCgroupV2Controller); -VIR_ENUM_IMPL(virCgroupV2Controller, +VIR_ENUM_IMPL(virCgroupV2Controller, NULL, VIR_CGROUP_CONTROLLER_LAST, "cpu", "cpuacct", "cpuset", "memory", "devices", "freezer", "io", "net_cls", "perf_event", "name=systemd", diff --git a/src/util/virconf.c b/src/util/virconf.c index 665805b7cf..709b688628 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -65,7 +65,7 @@ struct _virConfParserCtxt { do { while ((ctxt->cur < ctxt->end) && (c_isblank(CUR))) \ ctxt->cur++; } while (0) -VIR_ENUM_IMPL(virConf, +VIR_ENUM_IMPL(virConf, NULL, VIR_CONF_LAST, "*unexpected*", "long", diff --git a/src/util/virenum.c b/src/util/virenum.c index 6ae8d9fb2a..cbe0444ba0 100644 --- a/src/util/virenum.c +++ b/src/util/virenum.c @@ -23,14 +23,14 @@ #define VIR_FROM_THIS VIR_FROM_NONE -VIR_ENUM_IMPL(virTristateBool, +VIR_ENUM_IMPL(virTristateBool, NULL, VIR_TRISTATE_BOOL_LAST, "default", "yes", "no", ); -VIR_ENUM_IMPL(virTristateSwitch, +VIR_ENUM_IMPL(virTristateSwitch, NULL, VIR_TRISTATE_SWITCH_LAST, "default", "on", diff --git a/src/util/virenum.h b/src/util/virenum.h index 706ae752d8..9eb3bc4bc4 100644 --- a/src/util/virenum.h +++ b/src/util/virenum.h @@ -33,19 +33,19 @@ virEnumToString(const char * const *types, int type, const char *label); -# define VIR_ENUM_IMPL(name, lastVal, ...) \ +# define VIR_ENUM_IMPL(name, label, lastVal, ...) \ static const char *const name ## TypeList[] = { __VA_ARGS__ }; \ const char *name ## TypeToString(int type) { \ return virEnumToString(name ## TypeList, \ ARRAY_CARDINALITY(name ## TypeList), \ type, \ - NULL); \ + label); \ } \ int name ## TypeFromString(const char *type) { \ return virEnumFromString(name ## TypeList, \ ARRAY_CARDINALITY(name ## TypeList), \ type, \ - NULL); \ + label); \ } \ verify(ARRAY_CARDINALITY(name ## TypeList) == lastVal) diff --git a/src/util/virerror.c b/src/util/virerror.c index 37b5b2f3f9..0a4b2ff00e 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -57,7 +57,7 @@ static virLogPriority virErrorLevelPriority(virErrorLevel level) VIR_ENUM_DECL(virErrorDomain); -VIR_ENUM_IMPL(virErrorDomain, +VIR_ENUM_IMPL(virErrorDomain, NULL, VIR_ERR_DOMAIN_LAST, "", /* 0 */ "Xen Driver", diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index f6344b631c..88eab85783 100644 --- a/src/util/virfirewall.c +++ b/src/util/virfirewall.c @@ -42,7 +42,7 @@ typedef struct _virFirewallGroup virFirewallGroup; typedef virFirewallGroup *virFirewallGroupPtr; VIR_ENUM_DECL(virFirewallLayerCommand); -VIR_ENUM_IMPL(virFirewallLayerCommand, +VIR_ENUM_IMPL(virFirewallLayerCommand, NULL, VIR_FIREWALL_LAYER_LAST, EBTABLES_PATH, IPTABLES_PATH, diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c index 60b75e7e25..7b0c0da2ea 100644 --- a/src/util/virfirewalld.c +++ b/src/util/virfirewalld.c @@ -41,7 +41,7 @@ VIR_LOG_INIT("util.firewalld"); * understood by the firewalld.direct "passthrough" method */ VIR_ENUM_DECL(virFirewallLayerFirewallD); -VIR_ENUM_IMPL(virFirewallLayerFirewallD, +VIR_ENUM_IMPL(virFirewallLayerFirewallD, NULL, VIR_FIREWALL_LAYER_LAST, "eb", "ipv4", @@ -50,7 +50,7 @@ VIR_ENUM_IMPL(virFirewallLayerFirewallD, VIR_ENUM_DECL(virFirewallDBackend); -VIR_ENUM_IMPL(virFirewallDBackend, +VIR_ENUM_IMPL(virFirewallDBackend, NULL, VIR_FIREWALLD_BACKEND_LAST, "", "iptables", diff --git a/src/util/virgic.c b/src/util/virgic.c index a3ea3ce6ff..95b22d636c 100644 --- a/src/util/virgic.c +++ b/src/util/virgic.c @@ -23,7 +23,7 @@ #include "virgic.h" #include "virutil.h" -VIR_ENUM_IMPL(virGICVersion, +VIR_ENUM_IMPL(virGICVersion, NULL, VIR_GIC_VERSION_LAST, "none", "host", diff --git a/src/util/virhook.c b/src/util/virhook.c index 57549ef8e5..82001c3eeb 100644 --- a/src/util/virhook.c +++ b/src/util/virhook.c @@ -49,7 +49,7 @@ VIR_ENUM_DECL(virHookLxcOp); VIR_ENUM_DECL(virHookNetworkOp); VIR_ENUM_DECL(virHookLibxlOp); -VIR_ENUM_IMPL(virHookDriver, +VIR_ENUM_IMPL(virHookDriver, NULL, VIR_HOOK_DRIVER_LAST, "daemon", "qemu", @@ -58,21 +58,21 @@ VIR_ENUM_IMPL(virHookDriver, "libxl", ); -VIR_ENUM_IMPL(virHookDaemonOp, +VIR_ENUM_IMPL(virHookDaemonOp, NULL, VIR_HOOK_DAEMON_OP_LAST, "start", "shutdown", "reload", ); -VIR_ENUM_IMPL(virHookSubop, +VIR_ENUM_IMPL(virHookSubop, NULL, VIR_HOOK_SUBOP_LAST, "-", "begin", "end", ); -VIR_ENUM_IMPL(virHookQemuOp, +VIR_ENUM_IMPL(virHookQemuOp, NULL, VIR_HOOK_QEMU_OP_LAST, "start", "stopped", @@ -85,7 +85,7 @@ VIR_ENUM_IMPL(virHookQemuOp, "restore", ); -VIR_ENUM_IMPL(virHookLxcOp, +VIR_ENUM_IMPL(virHookLxcOp, NULL, VIR_HOOK_LXC_OP_LAST, "start", "stopped", @@ -95,7 +95,7 @@ VIR_ENUM_IMPL(virHookLxcOp, "reconnect", ); -VIR_ENUM_IMPL(virHookNetworkOp, +VIR_ENUM_IMPL(virHookNetworkOp, NULL, VIR_HOOK_NETWORK_OP_LAST, "start", "started", @@ -105,7 +105,7 @@ VIR_ENUM_IMPL(virHookNetworkOp, "updated", ); -VIR_ENUM_IMPL(virHookLibxlOp, +VIR_ENUM_IMPL(virHookLibxlOp, NULL, VIR_HOOK_LIBXL_OP_LAST, "start", "stopped", diff --git a/src/util/virkeycode.c b/src/util/virkeycode.c index 336443e01d..5a4cce3168 100644 --- a/src/util/virkeycode.c +++ b/src/util/virkeycode.c @@ -68,7 +68,7 @@ verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyNameTable_linux)); verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyNameTable_osx)); verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyNameTable_win32)); -VIR_ENUM_IMPL(virKeycodeSet, +VIR_ENUM_IMPL(virKeycodeSet, NULL, VIR_KEYCODE_SET_LAST, "linux", "xt", diff --git a/src/util/virlog.c b/src/util/virlog.c index 248ce19902..ed8c772d72 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -76,7 +76,7 @@ static char virLogHostname[HOST_NAME_MAX+1]; VIR_LOG_PID_REGEX ": " VIR_LOG_LEVEL_REGEX " : " VIR_ENUM_DECL(virLogDestination); -VIR_ENUM_IMPL(virLogDestination, +VIR_ENUM_IMPL(virLogDestination, NULL, VIR_LOG_TO_OUTPUT_LAST, "stderr", "syslog", "file", "journald", ); diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 3d5488cdae..98d1c15b25 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -47,7 +47,7 @@ struct _virMediatedDeviceList { virMediatedDevicePtr *devs; }; -VIR_ENUM_IMPL(virMediatedDeviceModel, +VIR_ENUM_IMPL(virMediatedDeviceModel, NULL, VIR_MDEV_MODEL_TYPE_LAST, "vfio-pci", "vfio-ccw", diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 5c0e9723b9..39069fdd22 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -2413,7 +2413,7 @@ virNetDevSetNetConfig(const char *linkdev ATTRIBUTE_UNUSED, #endif /* defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX) */ -VIR_ENUM_IMPL(virNetDevIfState, +VIR_ENUM_IMPL(virNetDevIfState, NULL, VIR_NETDEV_IF_STATE_LAST, "" /* value of zero means no state */, "unknown", "notpresent", @@ -2421,7 +2421,7 @@ VIR_ENUM_IMPL(virNetDevIfState, "testing", "dormant", "up", ); -VIR_ENUM_IMPL(virNetDevFeature, +VIR_ENUM_IMPL(virNetDevFeature, NULL, VIR_NET_DEV_FEAT_LAST, "rx", "tx", @@ -2765,7 +2765,7 @@ static int virNetDevGetMcastList(const char *ifname, } -VIR_ENUM_IMPL(virNetDevRxFilterMode, +VIR_ENUM_IMPL(virNetDevRxFilterMode, NULL, VIR_NETDEV_RX_FILTER_MODE_LAST, "none", "normal", diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index 3302522289..d2e091d95a 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -32,7 +32,7 @@ #define VIR_FROM_THIS VIR_FROM_NET -VIR_ENUM_IMPL(virNetDevMacVLanMode, +VIR_ENUM_IMPL(virNetDevMacVLanMode, NULL, VIR_NETDEV_MACVLAN_MODE_LAST, "vepa", "private", diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c index 32a366d4da..5d6362816a 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -25,7 +25,7 @@ #define VIR_FROM_THIS VIR_FROM_NET -VIR_ENUM_IMPL(virNetDevVPort, +VIR_ENUM_IMPL(virNetDevVPort, NULL, VIR_NETDEV_VPORT_PROFILE_LAST, "none", "802.1Qbg", @@ -34,7 +34,7 @@ VIR_ENUM_IMPL(virNetDevVPort, "midonet", ); -VIR_ENUM_IMPL(virNetDevVPortProfileOp, +VIR_ENUM_IMPL(virNetDevVPortProfileOp, NULL, VIR_NETDEV_VPORT_PROFILE_OP_LAST, "create", "save", diff --git a/src/util/virpci.c b/src/util/virpci.c index 8f2936c23a..c765ff1f9c 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -46,12 +46,12 @@ VIR_LOG_INIT("util.pci"); #define PCI_ID_LEN 10 /* "XXXX XXXX" */ #define PCI_ADDR_LEN 13 /* "XXXX:XX:XX.X" */ -VIR_ENUM_IMPL(virPCIELinkSpeed, +VIR_ENUM_IMPL(virPCIELinkSpeed, NULL, VIR_PCIE_LINK_SPEED_LAST, "", "2.5", "5", "8", "16", ); -VIR_ENUM_IMPL(virPCIStubDriver, +VIR_ENUM_IMPL(virPCIStubDriver, NULL, VIR_PCI_STUB_DRIVER_LAST, "none", "pciback", /* XEN */ @@ -59,7 +59,7 @@ VIR_ENUM_IMPL(virPCIStubDriver, "vfio-pci", /* VFIO */ ); -VIR_ENUM_IMPL(virPCIHeader, +VIR_ENUM_IMPL(virPCIHeader, NULL, VIR_PCI_HEADER_LAST, "endpoint", "pci-bridge", diff --git a/src/util/virperf.c b/src/util/virperf.c index 7c328da574..6e05e165bd 100644 --- a/src/util/virperf.c +++ b/src/util/virperf.c @@ -34,7 +34,7 @@ VIR_LOG_INIT("util.perf"); #define VIR_FROM_THIS VIR_FROM_PERF -VIR_ENUM_IMPL(virPerfEvent, +VIR_ENUM_IMPL(virPerfEvent, NULL, VIR_PERF_EVENT_LAST, "cmt", "mbmt", "mbml", "cpu_cycles", "instructions", diff --git a/src/util/virprocess.c b/src/util/virprocess.c index f2533f639f..94c8d99abb 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -107,7 +107,7 @@ static inline int setns(int fd ATTRIBUTE_UNUSED, int nstype ATTRIBUTE_UNUSED) } #endif -VIR_ENUM_IMPL(virProcessSchedPolicy, +VIR_ENUM_IMPL(virProcessSchedPolicy, NULL, VIR_PROC_POLICY_LAST, "none", "batch", diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index b845f366f0..080665f5e9 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -53,7 +53,7 @@ VIR_LOG_INIT("util.virresctrl"); * consistent in between all of them. */ /* Cache name mapping for Linux kernel naming. */ -VIR_ENUM_IMPL(virCacheKernel, +VIR_ENUM_IMPL(virCacheKernel, NULL, VIR_CACHE_TYPE_LAST, "Unified", "Instruction", @@ -61,7 +61,7 @@ VIR_ENUM_IMPL(virCacheKernel, ); /* Cache name mapping for our XML naming. */ -VIR_ENUM_IMPL(virCache, +VIR_ENUM_IMPL(virCache, NULL, VIR_CACHE_TYPE_LAST, "both", "code", @@ -70,7 +70,7 @@ VIR_ENUM_IMPL(virCache, /* Cache name mapping for resctrl interface naming. */ VIR_ENUM_DECL(virResctrl); -VIR_ENUM_IMPL(virResctrl, +VIR_ENUM_IMPL(virResctrl, NULL, VIR_CACHE_TYPE_LAST, "", "CODE", @@ -78,7 +78,7 @@ VIR_ENUM_IMPL(virResctrl, ); /* Monitor feature name prefix mapping for monitor naming */ -VIR_ENUM_IMPL(virResctrlMonitorPrefix, +VIR_ENUM_IMPL(virResctrlMonitorPrefix, NULL, VIR_RESCTRL_MONITOR_TYPE_LAST, "__unsupported__", "llc_", diff --git a/src/util/virsecret.c b/src/util/virsecret.c index 854dc72b06..648130d657 100644 --- a/src/util/virsecret.c +++ b/src/util/virsecret.c @@ -32,7 +32,7 @@ VIR_LOG_INIT("util.secret"); -VIR_ENUM_IMPL(virSecretUsage, +VIR_ENUM_IMPL(virSecretUsage, NULL, VIR_SECRET_USAGE_TYPE_LAST, "none", "volume", "ceph", "iscsi", "tls", ); diff --git a/src/util/virstorageencryption.c b/src/util/virstorageencryption.c index 49df7fddd8..3535ed5cad 100644 --- a/src/util/virstorageencryption.c +++ b/src/util/virstorageencryption.c @@ -37,12 +37,12 @@ #define VIR_FROM_THIS VIR_FROM_STORAGE -VIR_ENUM_IMPL(virStorageEncryptionSecret, +VIR_ENUM_IMPL(virStorageEncryptionSecret, NULL, VIR_STORAGE_ENCRYPTION_SECRET_TYPE_LAST, "passphrase", ); -VIR_ENUM_IMPL(virStorageEncryptionFormat, +VIR_ENUM_IMPL(virStorageEncryptionFormat, NULL, VIR_STORAGE_ENCRYPTION_FORMAT_LAST, "default", "qcow", "luks", ); diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 2b1c0a5b8e..654aaa5a82 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -49,7 +49,7 @@ VIR_LOG_INIT("util.storagefile"); static virClassPtr virStorageSourceClass; -VIR_ENUM_IMPL(virStorage, +VIR_ENUM_IMPL(virStorage, NULL, VIR_STORAGE_TYPE_LAST, "none", "file", @@ -59,7 +59,7 @@ VIR_ENUM_IMPL(virStorage, "volume", ); -VIR_ENUM_IMPL(virStorageFileFormat, +VIR_ENUM_IMPL(virStorageFileFormat, NULL, VIR_STORAGE_FILE_LAST, "none", "raw", "dir", "bochs", @@ -71,12 +71,12 @@ VIR_ENUM_IMPL(virStorageFileFormat, "cow", "qcow", "qcow2", "qed", "vmdk", ); -VIR_ENUM_IMPL(virStorageFileFeature, +VIR_ENUM_IMPL(virStorageFileFeature, NULL, VIR_STORAGE_FILE_FEATURE_LAST, "lazy_refcounts", ); -VIR_ENUM_IMPL(virStorageNetProtocol, +VIR_ENUM_IMPL(virStorageNetProtocol, NULL, VIR_STORAGE_NET_PROTOCOL_LAST, "none", "nbd", @@ -93,21 +93,21 @@ VIR_ENUM_IMPL(virStorageNetProtocol, "vxhs", ); -VIR_ENUM_IMPL(virStorageNetHostTransport, +VIR_ENUM_IMPL(virStorageNetHostTransport, NULL, VIR_STORAGE_NET_HOST_TRANS_LAST, "tcp", "unix", "rdma", ); -VIR_ENUM_IMPL(virStorageSourcePoolMode, +VIR_ENUM_IMPL(virStorageSourcePoolMode, NULL, VIR_STORAGE_SOURCE_POOL_MODE_LAST, "default", "host", "direct", ); -VIR_ENUM_IMPL(virStorageAuth, +VIR_ENUM_IMPL(virStorageAuth, NULL, VIR_STORAGE_AUTH_TYPE_LAST, "none", "chap", "ceph", ); diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 79a935b90a..b874bdcda0 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -41,7 +41,7 @@ VIR_LOG_INIT("util.sysinfo"); -VIR_ENUM_IMPL(virSysinfo, +VIR_ENUM_IMPL(virSysinfo, NULL, VIR_SYSINFO_LAST, "smbios", ); diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index 8f23348d97..d123fcf37a 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c @@ -31,7 +31,7 @@ #define VIR_FROM_THIS VIR_FROM_NONE -VIR_ENUM_IMPL(virTypedParameter, +VIR_ENUM_IMPL(virTypedParameter, NULL, VIR_TYPED_PARAM_LAST, "unknown", "int", diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 963e7a9876..5d5e7cfe96 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware/vmware_conf.c @@ -38,7 +38,7 @@ VIR_LOG_INIT("vmware.vmware_conf"); -VIR_ENUM_IMPL(vmwareDriver, +VIR_ENUM_IMPL(vmwareDriver, NULL, VMWARE_DRIVER_LAST, "player", "ws", diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index cf2d4df945..811110c3ce 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -509,7 +509,7 @@ def->parallels[0]... * this is good enough for now because all virDomainControllerModel values * are actually SCSI controller models in the ESX case */ VIR_ENUM_DECL(virVMXControllerModelSCSI); -VIR_ENUM_IMPL(virVMXControllerModelSCSI, +VIR_ENUM_IMPL(virVMXControllerModelSCSI, NULL, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST, "auto", /* just to match virDomainControllerModel, will never be used */ "buslogic", diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index d87475f6f6..9a216dcd12 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -38,7 +38,7 @@ #include "virenum.h" VIR_ENUM_DECL(virshDomainIOError); -VIR_ENUM_IMPL(virshDomainIOError, +VIR_ENUM_IMPL(virshDomainIOError, NULL, VIR_DOMAIN_DISK_ERROR_LAST, N_("no error"), N_("unspecified error"), @@ -102,7 +102,7 @@ virshGetDomainDescription(vshControl *ctl, virDomainPtr dom, bool title, } VIR_ENUM_DECL(virshDomainControlState); -VIR_ENUM_IMPL(virshDomainControlState, +VIR_ENUM_IMPL(virshDomainControlState, NULL, VIR_DOMAIN_CONTROL_LAST, N_("ok"), N_("background job"), @@ -118,7 +118,7 @@ virshDomainControlStateToString(int state) } VIR_ENUM_DECL(virshDomainControlErrorReason); -VIR_ENUM_IMPL(virshDomainControlErrorReason, +VIR_ENUM_IMPL(virshDomainControlErrorReason, NULL, VIR_DOMAIN_CONTROL_ERROR_REASON_LAST, "", N_("unknown"), @@ -134,7 +134,7 @@ virshDomainControlErrorReasonToString(int reason) } VIR_ENUM_DECL(virshDomainState); -VIR_ENUM_IMPL(virshDomainState, +VIR_ENUM_IMPL(virshDomainState, NULL, VIR_DOMAIN_LAST, N_("no state"), N_("running"), @@ -154,13 +154,13 @@ virshDomainStateToString(int state) } VIR_ENUM_DECL(virshDomainNostateReason); -VIR_ENUM_IMPL(virshDomainNostateReason, +VIR_ENUM_IMPL(virshDomainNostateReason, NULL, VIR_DOMAIN_NOSTATE_LAST, N_("unknown"), ); VIR_ENUM_DECL(virshDomainRunningReason); -VIR_ENUM_IMPL(virshDomainRunningReason, +VIR_ENUM_IMPL(virshDomainRunningReason, NULL, VIR_DOMAIN_RUNNING_LAST, N_("unknown"), N_("booted"), @@ -176,13 +176,13 @@ VIR_ENUM_IMPL(virshDomainRunningReason, ); VIR_ENUM_DECL(virshDomainBlockedReason); -VIR_ENUM_IMPL(virshDomainBlockedReason, +VIR_ENUM_IMPL(virshDomainBlockedReason, NULL, VIR_DOMAIN_BLOCKED_LAST, N_("unknown"), ); VIR_ENUM_DECL(virshDomainPausedReason); -VIR_ENUM_IMPL(virshDomainPausedReason, +VIR_ENUM_IMPL(virshDomainPausedReason, NULL, VIR_DOMAIN_PAUSED_LAST, N_("unknown"), N_("user"), @@ -201,14 +201,14 @@ VIR_ENUM_IMPL(virshDomainPausedReason, ); VIR_ENUM_DECL(virshDomainShutdownReason); -VIR_ENUM_IMPL(virshDomainShutdownReason, +VIR_ENUM_IMPL(virshDomainShutdownReason, NULL, VIR_DOMAIN_SHUTDOWN_LAST, N_("unknown"), N_("user"), ); VIR_ENUM_DECL(virshDomainShutoffReason); -VIR_ENUM_IMPL(virshDomainShutoffReason, +VIR_ENUM_IMPL(virshDomainShutoffReason, NULL, VIR_DOMAIN_SHUTOFF_LAST, N_("unknown"), N_("shutdown"), @@ -222,14 +222,14 @@ VIR_ENUM_IMPL(virshDomainShutoffReason, ); VIR_ENUM_DECL(virshDomainCrashedReason); -VIR_ENUM_IMPL(virshDomainCrashedReason, +VIR_ENUM_IMPL(virshDomainCrashedReason, NULL, VIR_DOMAIN_CRASHED_LAST, N_("unknown"), N_("panicked"), ); VIR_ENUM_DECL(virshDomainPMSuspendedReason); -VIR_ENUM_IMPL(virshDomainPMSuspendedReason, +VIR_ENUM_IMPL(virshDomainPMSuspendedReason, NULL, VIR_DOMAIN_PMSUSPENDED_LAST, N_("unknown"), ); diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index da57d96d1a..f8a1e2ae84 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -99,7 +99,7 @@ virshDomainDefine(virConnectPtr conn, const char *xml, unsigned int flags) } VIR_ENUM_DECL(virshDomainVcpuState); -VIR_ENUM_IMPL(virshDomainVcpuState, +VIR_ENUM_IMPL(virshDomainVcpuState, NULL, VIR_VCPU_LAST, N_("offline"), N_("running"), @@ -2556,7 +2556,7 @@ static const vshCmdOptDef opts_blockjob[] = { }; VIR_ENUM_DECL(virshDomainBlockJob); -VIR_ENUM_IMPL(virshDomainBlockJob, +VIR_ENUM_IMPL(virshDomainBlockJob, NULL, VIR_DOMAIN_BLOCK_JOB_TYPE_LAST, N_("Unknown job"), N_("Block Pull"), @@ -5645,13 +5645,13 @@ static const vshCmdOptDef opts_setLifecycleAction[] = { {.name = NULL} }; -VIR_ENUM_IMPL(virDomainLifecycle, +VIR_ENUM_IMPL(virDomainLifecycle, NULL, VIR_DOMAIN_LIFECYCLE_LAST, "poweroff", "reboot", "crash"); -VIR_ENUM_IMPL(virDomainLifecycleAction, +VIR_ENUM_IMPL(virDomainLifecycleAction, NULL, VIR_DOMAIN_LIFECYCLE_ACTION_LAST, "destroy", "restart", @@ -6042,7 +6042,7 @@ static const vshCmdOptDef opts_domjobinfo[] = { }; VIR_ENUM_DECL(virshDomainJob); -VIR_ENUM_IMPL(virshDomainJob, +VIR_ENUM_IMPL(virshDomainJob, NULL, VIR_DOMAIN_JOB_LAST, N_("None"), N_("Bounded"), @@ -6059,7 +6059,7 @@ virshDomainJobToString(int type) } VIR_ENUM_DECL(virshDomainJobOperation); -VIR_ENUM_IMPL(virshDomainJobOperation, +VIR_ENUM_IMPL(virshDomainJobOperation, NULL, VIR_DOMAIN_JOB_OPERATION_LAST, N_("Unknown"), N_("Start"), @@ -8777,7 +8777,7 @@ static const vshCmdOptDef opts_send_process_signal[] = { }; VIR_ENUM_DECL(virDomainProcessSignal); -VIR_ENUM_IMPL(virDomainProcessSignal, +VIR_ENUM_IMPL(virDomainProcessSignal, NULL, VIR_DOMAIN_PROCESS_SIGNAL_LAST, "nop", "hup", "int", "quit", "ill", /* 0-4 */ "trap", "abrt", "bus", "fpe", "kill", /* 5-9 */ @@ -12740,7 +12740,7 @@ cmdEdit(vshControl *ctl, const vshCmd *cmd) * "event" command */ VIR_ENUM_DECL(virshDomainEvent); -VIR_ENUM_IMPL(virshDomainEvent, +VIR_ENUM_IMPL(virshDomainEvent, NULL, VIR_DOMAIN_EVENT_LAST, N_("Defined"), N_("Undefined"), @@ -12760,7 +12760,7 @@ virshDomainEventToString(int event) } VIR_ENUM_DECL(virshDomainEventDefined); -VIR_ENUM_IMPL(virshDomainEventDefined, +VIR_ENUM_IMPL(virshDomainEventDefined, NULL, VIR_DOMAIN_EVENT_DEFINED_LAST, N_("Added"), N_("Updated"), @@ -12768,13 +12768,13 @@ VIR_ENUM_IMPL(virshDomainEventDefined, N_("Snapshot")); VIR_ENUM_DECL(virshDomainEventUndefined); -VIR_ENUM_IMPL(virshDomainEventUndefined, +VIR_ENUM_IMPL(virshDomainEventUndefined, NULL, VIR_DOMAIN_EVENT_UNDEFINED_LAST, N_("Removed"), N_("Renamed")); VIR_ENUM_DECL(virshDomainEventStarted); -VIR_ENUM_IMPL(virshDomainEventStarted, +VIR_ENUM_IMPL(virshDomainEventStarted, NULL, VIR_DOMAIN_EVENT_STARTED_LAST, N_("Booted"), N_("Migrated"), @@ -12783,7 +12783,7 @@ VIR_ENUM_IMPL(virshDomainEventStarted, N_("Event wakeup")); VIR_ENUM_DECL(virshDomainEventSuspended); -VIR_ENUM_IMPL(virshDomainEventSuspended, +VIR_ENUM_IMPL(virshDomainEventSuspended, NULL, VIR_DOMAIN_EVENT_SUSPENDED_LAST, N_("Paused"), N_("Migrated"), @@ -12796,7 +12796,7 @@ VIR_ENUM_IMPL(virshDomainEventSuspended, N_("Post-copy Error")); VIR_ENUM_DECL(virshDomainEventResumed); -VIR_ENUM_IMPL(virshDomainEventResumed, +VIR_ENUM_IMPL(virshDomainEventResumed, NULL, VIR_DOMAIN_EVENT_RESUMED_LAST, N_("Unpaused"), N_("Migrated"), @@ -12804,7 +12804,7 @@ VIR_ENUM_IMPL(virshDomainEventResumed, N_("Post-copy")); VIR_ENUM_DECL(virshDomainEventStopped); -VIR_ENUM_IMPL(virshDomainEventStopped, +VIR_ENUM_IMPL(virshDomainEventStopped, NULL, VIR_DOMAIN_EVENT_STOPPED_LAST, N_("Shutdown"), N_("Destroyed"), @@ -12815,20 +12815,20 @@ VIR_ENUM_IMPL(virshDomainEventStopped, N_("Snapshot")); VIR_ENUM_DECL(virshDomainEventShutdown); -VIR_ENUM_IMPL(virshDomainEventShutdown, +VIR_ENUM_IMPL(virshDomainEventShutdown, NULL, VIR_DOMAIN_EVENT_SHUTDOWN_LAST, N_("Finished"), N_("Finished after guest request"), N_("Finished after host request")); VIR_ENUM_DECL(virshDomainEventPMSuspended); -VIR_ENUM_IMPL(virshDomainEventPMSuspended, +VIR_ENUM_IMPL(virshDomainEventPMSuspended, NULL, VIR_DOMAIN_EVENT_PMSUSPENDED_LAST, N_("Memory"), N_("Disk")); VIR_ENUM_DECL(virshDomainEventCrashed); -VIR_ENUM_IMPL(virshDomainEventCrashed, +VIR_ENUM_IMPL(virshDomainEventCrashed, NULL, VIR_DOMAIN_EVENT_CRASHED_LAST, N_("Panicked")); @@ -12871,7 +12871,7 @@ virshDomainEventDetailToString(int event, int detail) } VIR_ENUM_DECL(virshDomainEventWatchdog); -VIR_ENUM_IMPL(virshDomainEventWatchdog, +VIR_ENUM_IMPL(virshDomainEventWatchdog, NULL, VIR_DOMAIN_EVENT_WATCHDOG_LAST, N_("none"), N_("pause"), @@ -12889,7 +12889,7 @@ virshDomainEventWatchdogToString(int action) } VIR_ENUM_DECL(virshDomainEventIOError); -VIR_ENUM_IMPL(virshDomainEventIOError, +VIR_ENUM_IMPL(virshDomainEventIOError, NULL, VIR_DOMAIN_EVENT_IO_ERROR_LAST, N_("none"), N_("pause"), @@ -12903,7 +12903,7 @@ virshDomainEventIOErrorToString(int action) } VIR_ENUM_DECL(virshGraphicsPhase); -VIR_ENUM_IMPL(virshGraphicsPhase, +VIR_ENUM_IMPL(virshGraphicsPhase, NULL, VIR_DOMAIN_EVENT_GRAPHICS_LAST, N_("connect"), N_("initialize"), @@ -12917,7 +12917,7 @@ virshGraphicsPhaseToString(int phase) } VIR_ENUM_DECL(virshGraphicsAddress); -VIR_ENUM_IMPL(virshGraphicsAddress, +VIR_ENUM_IMPL(virshGraphicsAddress, NULL, VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST, N_("IPv4"), N_("IPv6"), @@ -12931,7 +12931,7 @@ virshGraphicsAddressToString(int family) } VIR_ENUM_DECL(virshDomainBlockJobStatus); -VIR_ENUM_IMPL(virshDomainBlockJobStatus, +VIR_ENUM_IMPL(virshDomainBlockJobStatus, NULL, VIR_DOMAIN_BLOCK_JOB_LAST, N_("completed"), N_("failed"), @@ -12946,7 +12946,7 @@ virshDomainBlockJobStatusToString(int status) } VIR_ENUM_DECL(virshDomainEventDiskChange); -VIR_ENUM_IMPL(virshDomainEventDiskChange, +VIR_ENUM_IMPL(virshDomainEventDiskChange, NULL, VIR_DOMAIN_EVENT_DISK_CHANGE_LAST, N_("changed"), N_("dropped")); @@ -12959,7 +12959,7 @@ virshDomainEventDiskChangeToString(int reason) } VIR_ENUM_DECL(virshDomainEventTrayChange); -VIR_ENUM_IMPL(virshDomainEventTrayChange, +VIR_ENUM_IMPL(virshDomainEventTrayChange, NULL, VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST, N_("opened"), N_("closed")); @@ -13283,14 +13283,14 @@ virshEventTunablePrint(virConnectPtr conn ATTRIBUTE_UNUSED, } VIR_ENUM_DECL(virshEventAgentLifecycleState); -VIR_ENUM_IMPL(virshEventAgentLifecycleState, +VIR_ENUM_IMPL(virshEventAgentLifecycleState, NULL, VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_LAST, N_("unknown"), N_("connected"), N_("disconnected")); VIR_ENUM_DECL(virshEventAgentLifecycleReason); -VIR_ENUM_IMPL(virshEventAgentLifecycleReason, +VIR_ENUM_IMPL(virshEventAgentLifecycleReason, NULL, VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_LAST, N_("unknown"), N_("domain started"), @@ -13369,7 +13369,7 @@ virshEventDeviceRemovalFailedPrint(virConnectPtr conn ATTRIBUTE_UNUSED, } VIR_ENUM_DECL(virshEventMetadataChangeType); -VIR_ENUM_IMPL(virshEventMetadataChangeType, +VIR_ENUM_IMPL(virshEventMetadataChangeType, NULL, VIR_DOMAIN_METADATA_LAST, N_("description"), N_("title"), diff --git a/tools/virsh-host.c b/tools/virsh-host.c index da269f4c4c..596c9f759b 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -774,7 +774,7 @@ typedef enum { } virshCPUStats; VIR_ENUM_DECL(virshCPUStats); -VIR_ENUM_IMPL(virshCPUStats, +VIR_ENUM_IMPL(virshCPUStats, NULL, VIRSH_CPU_LAST, VIR_NODE_CPU_STATS_USER, VIR_NODE_CPU_STATS_KERNEL, diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 14bf9a144f..766ec50e0e 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -906,12 +906,12 @@ static const vshCmdOptDef opts_network_update[] = { }; VIR_ENUM_DECL(virNetworkUpdateCommand); -VIR_ENUM_IMPL(virNetworkUpdateCommand, +VIR_ENUM_IMPL(virNetworkUpdateCommand, NULL, VIR_NETWORK_UPDATE_COMMAND_LAST, "none", "modify", "delete", "add-last", "add-first"); VIR_ENUM_DECL(virNetworkSection); -VIR_ENUM_IMPL(virNetworkSection, +VIR_ENUM_IMPL(virNetworkSection, NULL, VIR_NETWORK_SECTION_LAST, "none", "bridge", "domain", "ip", "ip-dhcp-host", "ip-dhcp-range", "forward", "forward-interface", @@ -1140,7 +1140,7 @@ cmdNetworkEdit(vshControl *ctl, const vshCmd *cmd) * "net-event" command */ VIR_ENUM_DECL(virshNetworkEvent); -VIR_ENUM_IMPL(virshNetworkEvent, +VIR_ENUM_IMPL(virshNetworkEvent, NULL, VIR_NETWORK_EVENT_LAST, N_("Defined"), N_("Undefined"), @@ -1164,7 +1164,7 @@ struct virshNetEventData { typedef struct virshNetEventData virshNetEventData; VIR_ENUM_DECL(virshNetworkEventId); -VIR_ENUM_IMPL(virshNetworkEventId, +VIR_ENUM_IMPL(virshNetworkEventId, NULL, VIR_NETWORK_EVENT_ID_LAST, "lifecycle"); diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 0dfefe3a2f..3968ce63f2 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -757,7 +757,7 @@ cmdNodeDeviceReset(vshControl *ctl, const vshCmd *cmd) * "nodedev-event" command */ VIR_ENUM_DECL(virshNodeDeviceEvent); -VIR_ENUM_IMPL(virshNodeDeviceEvent, +VIR_ENUM_IMPL(virshNodeDeviceEvent, NULL, VIR_NODE_DEVICE_EVENT_LAST, N_("Created"), N_("Deleted")); diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index c56ab2d90a..51e7ba107e 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -1039,7 +1039,7 @@ virshStoragePoolListCollect(vshControl *ctl, VIR_ENUM_DECL(virshStoragePoolState); -VIR_ENUM_IMPL(virshStoragePoolState, +VIR_ENUM_IMPL(virshStoragePoolState, NULL, VIR_STORAGE_POOL_STATE_LAST, N_("inactive"), N_("building"), @@ -1890,7 +1890,7 @@ cmdPoolEdit(vshControl *ctl, const vshCmd *cmd) * "pool-event" command */ VIR_ENUM_DECL(virshPoolEvent); -VIR_ENUM_IMPL(virshPoolEvent, +VIR_ENUM_IMPL(virshPoolEvent, NULL, VIR_STORAGE_POOL_EVENT_LAST, N_("Defined"), N_("Undefined"), diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index b34ae12bbe..52ec392e79 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -566,7 +566,7 @@ cmdSecretList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED) * "Secret-event" command */ VIR_ENUM_DECL(virshSecretEvent); -VIR_ENUM_IMPL(virshSecretEvent, +VIR_ENUM_IMPL(virshSecretEvent, NULL, VIR_SECRET_EVENT_LAST, N_("Defined"), N_("Undefined")); diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 97803b21be..cc576ed8e4 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -937,7 +937,7 @@ static const vshCmdOptDef opts_vol_wipe[] = { }; VIR_ENUM_DECL(virStorageVolWipeAlgorithm); -VIR_ENUM_IMPL(virStorageVolWipeAlgorithm, +VIR_ENUM_IMPL(virStorageVolWipeAlgorithm, NULL, VIR_STORAGE_VOL_WIPE_ALG_LAST, "zero", "nnsa", "dod", "bsi", "gutmann", "schneier", "pfitzner7", "pfitzner33", "random", "trim"); @@ -984,7 +984,7 @@ cmdVolWipe(vshControl *ctl, const vshCmd *cmd) VIR_ENUM_DECL(virshStorageVol); -VIR_ENUM_IMPL(virshStorageVol, +VIR_ENUM_IMPL(virshStorageVol, NULL, VIR_STORAGE_VOL_LAST, N_("file"), N_("block"), diff --git a/tools/virt-admin.c b/tools/virt-admin.c index 4ff006ffcb..a4f9ad2b8b 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -56,7 +56,7 @@ static const vshCmdGrp cmdGroups[]; static const vshClientHooks hooks; VIR_ENUM_DECL(virClientTransport); -VIR_ENUM_IMPL(virClientTransport, +VIR_ENUM_IMPL(virClientTransport, NULL, VIR_CLIENT_TRANS_LAST, N_("unix"), N_("tcp"), diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c index 804c0adc2d..49b08677fb 100644 --- a/tools/virt-host-validate-common.c +++ b/tools/virt-host-validate-common.c @@ -35,7 +35,7 @@ #define VIR_FROM_THIS VIR_FROM_NONE -VIR_ENUM_IMPL(virHostValidateCPUFlag, +VIR_ENUM_IMPL(virHostValidateCPUFlag, NULL, VIR_HOST_VALIDATE_CPU_FLAG_LAST, "vmx", "svm", From patchwork Mon Apr 15 21:26:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 162282 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3422356jan; Mon, 15 Apr 2019 14:26:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqz41HuGuFUg83BTjJvvFhtGuxOElN/o4DG4TJGABn4fMq9P6KyQcJlu6FFAxX8g9c/e4CPB X-Received: by 2002:ac8:f38:: with SMTP id e53mr62034770qtk.115.1555363619230; Mon, 15 Apr 2019 14:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555363619; cv=none; d=google.com; s=arc-20160816; b=sp1HDS5n90ZLPG8ZFxsI2JmpPSDxMPMWJahjbsSY+mh/ucwkmBxvnlMonaZLParIpx yaJc7UXY6KwzVtvJD1DE3o/+1z6AVBfWAHNmrp2UhCUKaGMkpjwr4QW0HoMlZERKDAUA R9IGSt1Uo7IDtxattHJ3jZxQ0t29j7wvZuFTwY0pgCfjeIzE7ngeoJrv3F4GmdCoA7C6 Fzu6BLu0pcHO0XrCa/zwNCYsxzd8LViaj52RGD9+SLVK1uq+qBSPNm6kYuGB6fG8PLJX 79zwknityuEU2C7g1/UI8YgqET23ik6K4lTGfzP81D5h2kcLoTmnkEFzdAA7Vf1MlP7p KzJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=eBfkAyahfpEOGyD3QaEqMX40TFJ5bDFDVn7UxZIQfHc=; b=AjOyGfCJ0c9kE3s8T2fXlrcm1TqBYJIKIPVq/NybIddLmSRI1X04yBs5/6U0FpSmIF VF9V/Vb/ndvZGvipz/NDB+X30M5A4kj0XspKOfWz19wza90XkxnmEq0vEe+ZfvynLMP7 lUPke57BjYNaf6StkhObsfZQygCMS7OIPks+cP2e6jhi5caZNFnWRGW/DIt+TToKnqYq ViD0Yhzdgjtrjvbezu7ZuOm3VbpeaCRwqA5j/7wn0JvWXHTtnEmGJfxOBHVClWNa7YIX FopZ2YkgAnBGHRAwJFTGaq016T/dELPSVesdw2nriLRbbZu2zgPQYiK3okVDvpw9bt9C etSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id b18si1193113qte.123.2019.04.15.14.26.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 14:26:59 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C98EA30832E8; Mon, 15 Apr 2019 21:26:57 +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 A65AB5C1A1; Mon, 15 Apr 2019 21:26:57 +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 62B0541F3F; Mon, 15 Apr 2019 21:26:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FLQsUd032262 for ; Mon, 15 Apr 2019 17:26:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id BB399608C8; Mon, 15 Apr 2019 21:26:54 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-124-108.rdu2.redhat.com [10.10.124.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F1CE608C2; Mon, 15 Apr 2019 21:26:54 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 15 Apr 2019 17:26:42 -0400 Message-Id: <6426ebc4429aeb2d475e55ab8af8ca69a9197731.1555363506.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/3] conf: Add virDomainVirtType enum error label 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 15 Apr 2019 21:26:58 +0000 (UTC) Signed-off-by: Cole Robinson --- Not sure if we should apply this now or after some flag day. I'm open to suggestions src/bhyve/bhyve_driver.c | 6 +----- src/conf/domain_conf.c | 12 +++--------- src/libxl/libxl_driver.c | 6 +----- src/qemu/qemu_capabilities.c | 5 +---- 4 files changed, 6 insertions(+), 23 deletions(-) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 061888ab0b..ccfcee379f 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -1589,12 +1589,8 @@ bhyveConnectGetDomainCapabilities(virConnectPtr conn, return ret; if (virttype_str && - (virttype = virDomainVirtTypeFromString(virttype_str)) < 0) { - virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), - virttype_str); + (virttype = virDomainVirtTypeFromString(virttype_str)) < 0) goto cleanup; - } if (virttype != VIR_DOMAIN_VIRT_BHYVE) { virReportError(VIR_ERR_INVALID_ARG, diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 60b8feee0c..1fbe8c040b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -104,7 +104,7 @@ VIR_ENUM_IMPL(virDomainTaint, NULL, "custom-ga-command", ); -VIR_ENUM_IMPL(virDomainVirt, NULL, +VIR_ENUM_IMPL(virDomainVirt, "domain type", VIR_DOMAIN_VIRT_LAST, "none", "qemu", @@ -19327,11 +19327,8 @@ virDomainDefParseCaps(virDomainDefPtr def, "%s", _("missing domain type attribute")); return -1; } - if ((def->virtType = virDomainVirtTypeFromString(virttype)) < 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid domain type %s"), virttype); + if ((def->virtType = virDomainVirtTypeFromString(virttype)) < 0) return -1; - } if (!ostype) { if (def->os.bootloader) { @@ -28035,11 +28032,8 @@ virDomainDefFormatInternal(virDomainDefPtr def, VIR_DOMAIN_DEF_FORMAT_CLOCK_ADJUST, -1); - if (!(type = virDomainVirtTypeToString(def->virtType))) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected domain type %d"), def->virtType); + if (!(type = virDomainVirtTypeToString(def->virtType))) goto error; - } if (def->id == -1) flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE; diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index a9edc8211d..428ef1f64e 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -6365,12 +6365,8 @@ libxlConnectGetDomainCapabilities(virConnectPtr conn, cfg = libxlDriverConfigGet(driver); if (virttype_str && - (virttype = virDomainVirtTypeFromString(virttype_str)) < 0) { - virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), - virttype_str); + (virttype = virDomainVirtTypeFromString(virttype_str)) < 0) goto cleanup; - } if (virttype != VIR_DOMAIN_VIRT_XEN) { virReportError(VIR_ERR_INVALID_ARG, diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9eb5e418cc..27315efb15 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4800,11 +4800,8 @@ virQEMUCapsCacheLookupDefault(virFileCachePtr cache, virQEMUCapsPtr ret = NULL; if (virttypeStr && - (virttype = virDomainVirtTypeFromString(virttypeStr)) < 0) { - virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), virttypeStr); + (virttype = virDomainVirtTypeFromString(virttypeStr)) < 0) goto cleanup; - } if (archStr && (arch = virArchFromString(archStr)) == VIR_ARCH_NONE) {