This is a follow on from a discussion with Andrea here:
https://www.redhat.com/archives/libvir-list/2019-January/msg00750.html
Most VIR_ENUM_IMPLS look like this:
VIR_ENUM_IMPL(XXX, XXX,
"value1",
"value2");
But he and I find this format nicer:
VIR_ENUM_IMPL(XXX, XXX,
"value1",
"value2",
);
The latter format means new enum additions only trigger 1 line of
diff, vs 2 for the current common method.
Since this patch series is already touching a lot of VIR_ENUM_IMPL
endings, now is as good a time as any to widely switch to that
format if others agree.
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/access/viraccessperm.c | 30 ++-
src/conf/capabilities.c | 3 +-
src/conf/cpu_conf.c | 21 ++-
src/conf/domain_capabilities.c | 3 +-
src/conf/domain_conf.c | 309 ++++++++++++++++++++-----------
src/conf/interface_conf.c | 3 +-
src/conf/netdev_vlan_conf.c | 3 +-
src/conf/network_conf.c | 15 +-
src/conf/node_device_conf.c | 12 +-
src/conf/numa_conf.c | 9 +-
src/conf/nwfilter_conf.c | 21 ++-
src/conf/snapshot_conf.c | 6 +-
src/conf/storage_adapter_conf.c | 3 +-
src/conf/storage_conf.c | 24 ++-
src/locking/lock_daemon.c | 3 +-
src/logging/log_daemon.c | 3 +-
src/lxc/lxc_domain.c | 6 +-
src/network/leaseshelper.c | 3 +-
src/qemu/qemu_agent.c | 6 +-
src/qemu/qemu_command.c | 27 ++-
src/qemu/qemu_driver.c | 6 +-
src/qemu/qemu_migration_cookie.c | 3 +-
src/qemu/qemu_monitor.c | 12 +-
src/qemu/qemu_monitor_json.c | 12 +-
src/remote/remote_daemon.c | 3 +-
src/util/vircgroup.c | 3 +-
src/util/vircgroupbackend.c | 3 +-
src/util/vircgroupv1.c | 3 +-
src/util/vircgroupv2.c | 3 +-
src/util/virconf.c | 3 +-
src/util/virerror.c | 2 +-
src/util/virfirewall.c | 6 +-
src/util/virgic.c | 2 +-
src/util/virhook.c | 21 ++-
src/util/virkeycode.c | 2 +-
src/util/virlog.c | 3 +-
src/util/virmdev.c | 3 +-
src/util/virnetdev.c | 9 +-
src/util/virnetdevmacvlan.c | 3 +-
src/util/virnetdevvportprofile.c | 6 +-
src/util/virpci.c | 7 +-
src/util/virperf.c | 3 +-
src/util/virprocess.c | 3 +-
src/util/virresctrl.c | 12 +-
src/util/virsecret.c | 3 +-
src/util/virstorageencryption.c | 7 +-
src/util/virstoragefile.c | 20 +-
src/util/virsysinfo.c | 3 +-
src/util/virtypedparam.c | 3 +-
src/util/virutil.c | 6 +-
src/vmware/vmware_conf.c | 3 +-
tools/virsh-domain-monitor.c | 36 ++--
52 files changed, 481 insertions(+), 243 deletions(-)
diff --git a/src/access/viraccessperm.c b/src/access/viraccessperm.c
index d7cbb70b7b..67f751ef9c 100644
--- a/src/access/viraccessperm.c
+++ b/src/access/viraccessperm.c
@@ -31,7 +31,8 @@ VIR_ENUM_IMPL(virAccessPermConnect,
"search_interfaces", "search_secrets",
"search_nwfilters", "search_nwfilter_bindings",
"detect_storage_pools", "pm_control",
- "interface_transaction");
+ "interface_transaction",
+);
VIR_ENUM_IMPL(virAccessPermDomain,
VIR_ACCESS_PERM_DOMAIN_LAST,
@@ -43,48 +44,57 @@ VIR_ENUM_IMPL(virAccessPermDomain,
"fs_trim", "fs_freeze",
"block_read", "block_write", "mem_read",
"open_graphics", "open_device",
"screenshot",
- "open_namespace", "set_time",
"set_password");
+ "open_namespace", "set_time",
"set_password",
+);
VIR_ENUM_IMPL(virAccessPermInterface,
VIR_ACCESS_PERM_INTERFACE_LAST,
"getattr", "read", "write",
"save",
- "delete", "start", "stop");
+ "delete", "start", "stop",
+);
VIR_ENUM_IMPL(virAccessPermNetwork,
VIR_ACCESS_PERM_NETWORK_LAST,
"getattr", "read", "write",
- "save", "delete", "start",
"stop");
+ "save", "delete", "start", "stop",
+);
VIR_ENUM_IMPL(virAccessPermNodeDevice,
VIR_ACCESS_PERM_NODE_DEVICE_LAST,
"getattr", "read", "write",
"start", "stop",
- "detach");
+ "detach",
+);
VIR_ENUM_IMPL(virAccessPermNWFilter,
VIR_ACCESS_PERM_NWFILTER_LAST,
"getattr", "read", "write",
- "save", "delete");
+ "save", "delete",
+);
VIR_ENUM_IMPL(virAccessPermNWFilterBinding,
VIR_ACCESS_PERM_NWFILTER_BINDING_LAST,
"getattr", "read",
- "create", "delete");
+ "create", "delete",
+);
VIR_ENUM_IMPL(virAccessPermSecret,
VIR_ACCESS_PERM_SECRET_LAST,
"getattr", "read", "write",
- "read_secure", "save", "delete");
+ "read_secure", "save", "delete",
+);
VIR_ENUM_IMPL(virAccessPermStoragePool,
VIR_ACCESS_PERM_STORAGE_POOL_LAST,
"getattr", "read", "write",
"save", "delete", "start", "stop",
"refresh", "search_storage_vols",
- "format");
+ "format",
+);
VIR_ENUM_IMPL(virAccessPermStorageVol,
VIR_ACCESS_PERM_STORAGE_VOL_LAST,
"getattr", "read", "create",
"delete",
"format", "resize", "data_read",
- "data_write");
+ "data_write",
+);
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index 47c196c7bf..b774c6ee22 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -49,7 +49,8 @@ VIR_LOG_INIT("conf.capabilities");
VIR_ENUM_DECL(virCapsHostPMTarget);
VIR_ENUM_IMPL(virCapsHostPMTarget, VIR_NODE_SUSPEND_TARGET_LAST,
- "suspend_mem", "suspend_disk",
"suspend_hybrid");
+ "suspend_mem", "suspend_disk",
"suspend_hybrid",
+);
static virClassPtr virCapsClass;
static void virCapsDispose(void *obj);
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 44a0b774a4..5f11dd1b0a 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -33,39 +33,46 @@
VIR_LOG_INIT("conf.cpu_conf");
VIR_ENUM_IMPL(virCPU, VIR_CPU_TYPE_LAST,
- "host", "guest", "auto");
+ "host", "guest", "auto",
+);
VIR_ENUM_IMPL(virCPUMode, VIR_CPU_MODE_LAST,
"custom",
"host-model",
- "host-passthrough");
+ "host-passthrough",
+);
VIR_ENUM_IMPL(virCPUMatch, VIR_CPU_MATCH_LAST,
"minimum",
"exact",
- "strict");
+ "strict",
+);
VIR_ENUM_IMPL(virCPUCheck, VIR_CPU_CHECK_LAST,
"default",
"none",
"partial",
- "full");
+ "full",
+);
VIR_ENUM_IMPL(virCPUFallback, VIR_CPU_FALLBACK_LAST,
"allow",
- "forbid");
+ "forbid",
+);
VIR_ENUM_IMPL(virCPUFeaturePolicy, VIR_CPU_FEATURE_LAST,
"force",
"require",
"optional",
"disable",
- "forbid");
+ "forbid",
+);
VIR_ENUM_IMPL(virCPUCacheMode, VIR_CPU_CACHE_MODE_LAST,
"emulate",
"passthrough",
- "disable");
+ "disable",
+);
void
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index e31b41e982..6352eda343 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -28,7 +28,8 @@
#define VIR_FROM_THIS VIR_FROM_CAPABILITIES
VIR_ENUM_IMPL(virDomainCapsCPUUsable, VIR_DOMCAPS_CPU_USABLE_LAST,
- "unknown", "yes", "no");
+ "unknown", "yes", "no",
+);
static virClassPtr virDomainCapsClass;
static virClassPtr virDomainCapsCPUModelsClass;
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d486271377..fb97149f05 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -99,7 +99,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
"hook-script",
"cdrom-passthrough",
"custom-dtb",
- "custom-ga-command");
+ "custom-ga-command",
+);
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
"none",
@@ -117,7 +118,8 @@ VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
"phyp",
"parallels",
"bhyve",
- "vz");
+ "vz",
+);
VIR_ENUM_IMPL(virDomainOS, VIR_DOMAIN_OSTYPE_LAST,
"hvm",
@@ -125,13 +127,15 @@ VIR_ENUM_IMPL(virDomainOS, VIR_DOMAIN_OSTYPE_LAST,
"linux",
"exe",
"uml",
- "xenpvh");
+ "xenpvh",
+);
VIR_ENUM_IMPL(virDomainBoot, VIR_DOMAIN_BOOT_LAST,
"fd",
"cdrom",
"hd",
- "network");
+ "network",
+);
VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
"acpi",
@@ -158,7 +162,8 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
"default",
"allow",
- "deny");
+ "deny",
+);
VIR_ENUM_IMPL(virDomainHyperv, VIR_DOMAIN_HYPERV_LAST,
"relaxed",
@@ -178,7 +183,8 @@ VIR_ENUM_IMPL(virDomainHyperv, VIR_DOMAIN_HYPERV_LAST,
);
VIR_ENUM_IMPL(virDomainKVM, VIR_DOMAIN_KVM_LAST,
- "hidden");
+ "hidden",
+);
VIR_ENUM_IMPL(virDomainCapsFeature, VIR_DOMAIN_CAPS_FEATURE_LAST,
"audit_control",
@@ -217,12 +223,14 @@ VIR_ENUM_IMPL(virDomainCapsFeature, VIR_DOMAIN_CAPS_FEATURE_LAST,
"sys_time",
"sys_tty_config",
"syslog",
- "wake_alarm");
+ "wake_alarm",
+);
VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST,
"poweroff",
"reboot",
- "crash");
+ "crash",
+);
VIR_ENUM_IMPL(virDomainLifecycleAction, VIR_DOMAIN_LIFECYCLE_ACTION_LAST,
"destroy",
@@ -230,14 +238,16 @@ VIR_ENUM_IMPL(virDomainLifecycleAction,
VIR_DOMAIN_LIFECYCLE_ACTION_LAST,
"rename-restart",
"preserve",
"coredump-destroy",
- "coredump-restart");
+ "coredump-restart",
+);
VIR_ENUM_IMPL(virDomainLockFailure, VIR_DOMAIN_LOCK_FAILURE_LAST,
"default",
"poweroff",
"restart",
"pause",
- "ignore");
+ "ignore",
+);
VIR_ENUM_IMPL(virDomainDevice, VIR_DOMAIN_DEVICE_LAST,
"none",
@@ -264,19 +274,22 @@ VIR_ENUM_IMPL(virDomainDevice, VIR_DOMAIN_DEVICE_LAST,
"panic",
"memory",
"iommu",
- "vsock");
+ "vsock",
+);
VIR_ENUM_IMPL(virDomainDiskDevice, VIR_DOMAIN_DISK_DEVICE_LAST,
"disk",
"cdrom",
"floppy",
- "lun");
+ "lun",
+);
VIR_ENUM_IMPL(virDomainDiskGeometryTrans, VIR_DOMAIN_DISK_TRANS_LAST,
"default",
"none",
"auto",
- "lba");
+ "lba",
+);
VIR_ENUM_IMPL(virDomainDiskBus, VIR_DOMAIN_DISK_BUS_LAST,
"ide",
@@ -287,7 +300,8 @@ VIR_ENUM_IMPL(virDomainDiskBus, VIR_DOMAIN_DISK_BUS_LAST,
"usb",
"uml",
"sata",
- "sd");
+ "sd",
+);
VIR_ENUM_IMPL(virDomainDiskCache, VIR_DOMAIN_DISK_CACHE_LAST,
"default",
@@ -295,24 +309,28 @@ VIR_ENUM_IMPL(virDomainDiskCache, VIR_DOMAIN_DISK_CACHE_LAST,
"writethrough",
"writeback",
"directsync",
- "unsafe");
+ "unsafe",
+);
VIR_ENUM_IMPL(virDomainDiskErrorPolicy, VIR_DOMAIN_DISK_ERROR_POLICY_LAST,
"default",
"stop",
"report",
"ignore",
- "enospace");
+ "enospace",
+);
VIR_ENUM_IMPL(virDomainDiskIo, VIR_DOMAIN_DISK_IO_LAST,
"default",
"native",
- "threads");
+ "threads",
+);
VIR_ENUM_IMPL(virDomainDeviceSGIO, VIR_DOMAIN_DEVICE_SGIO_LAST,
"default",
"filtered",
- "unfiltered");
+ "unfiltered",
+);
VIR_ENUM_IMPL(virDomainController, VIR_DOMAIN_CONTROLLER_TYPE_LAST,
"ide",
@@ -322,7 +340,8 @@ VIR_ENUM_IMPL(virDomainController, VIR_DOMAIN_CONTROLLER_TYPE_LAST,
"virtio-serial",
"ccid",
"usb",
- "pci");
+ "pci",
+);
VIR_ENUM_IMPL(virDomainControllerModelPCI, VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST,
"pci-root",
@@ -334,7 +353,8 @@ VIR_ENUM_IMPL(virDomainControllerModelPCI,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST,
"pcie-switch-upstream-port",
"pcie-switch-downstream-port",
"pci-expander-bus",
- "pcie-expander-bus");
+ "pcie-expander-bus",
+);
VIR_ENUM_IMPL(virDomainControllerPCIModelName,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST,
@@ -375,12 +395,14 @@ VIR_ENUM_IMPL(virDomainControllerModelUSB,
VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST,
"qusb1",
"qusb2",
"qemu-xhci",
- "none");
+ "none",
+);
VIR_ENUM_IMPL(virDomainControllerModelIDE, VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST,
"piix3",
"piix4",
- "ich6");
+ "ich6",
+);
VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,
"mount",
@@ -389,7 +411,8 @@ VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,
"template",
"ram",
"bind",
- "volume");
+ "volume",
+);
VIR_ENUM_IMPL(virDomainFSDriver, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
"default",
@@ -397,16 +420,19 @@ VIR_ENUM_IMPL(virDomainFSDriver, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
"handle",
"loop",
"nbd",
- "ploop");
+ "ploop",
+);
VIR_ENUM_IMPL(virDomainFSAccessMode, VIR_DOMAIN_FS_ACCESSMODE_LAST,
"passthrough",
"mapped",
- "squash");
+ "squash",
+);
VIR_ENUM_IMPL(virDomainFSWrpolicy, VIR_DOMAIN_FS_WRPOLICY_LAST,
"default",
- "immediate");
+ "immediate",
+);
VIR_ENUM_IMPL(virDomainNet, VIR_DOMAIN_NET_TYPE_LAST,
"user",
@@ -420,27 +446,32 @@ VIR_ENUM_IMPL(virDomainNet, VIR_DOMAIN_NET_TYPE_LAST,
"internal",
"direct",
"hostdev",
- "udp");
+ "udp",
+);
VIR_ENUM_IMPL(virDomainNetBackend, VIR_DOMAIN_NET_BACKEND_TYPE_LAST,
"default",
"qemu",
- "vhost");
+ "vhost",
+);
VIR_ENUM_IMPL(virDomainNetVirtioTxMode, VIR_DOMAIN_NET_VIRTIO_TX_MODE_LAST,
"default",
"iothread",
- "timer");
+ "timer",
+);
VIR_ENUM_IMPL(virDomainNetInterfaceLinkState, VIR_DOMAIN_NET_INTERFACE_LINK_STATE_LAST,
"default",
"up",
- "down");
+ "down",
+);
VIR_ENUM_IMPL(virDomainChrDeviceState, VIR_DOMAIN_CHR_DEVICE_STATE_LAST,
"default",
"connected",
- "disconnected");
+ "disconnected",
+);
VIR_ENUM_IMPL(virDomainChrSerialTarget,
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST,
@@ -458,7 +489,8 @@ VIR_ENUM_IMPL(virDomainChrChannelTarget,
"none",
"guestfwd",
"virtio",
- "xen");
+ "xen",
+);
VIR_ENUM_IMPL(virDomainChrConsoleTarget,
VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST,
@@ -470,7 +502,8 @@ VIR_ENUM_IMPL(virDomainChrConsoleTarget,
"lxc",
"openvz",
"sclp",
- "sclplm");
+ "sclplm",
+);
VIR_ENUM_IMPL(virDomainChrSerialTargetModel,
VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST,
@@ -489,7 +522,8 @@ VIR_ENUM_IMPL(virDomainChrDevice, VIR_DOMAIN_CHR_DEVICE_TYPE_LAST,
"parallel",
"serial",
"console",
- "channel");
+ "channel",
+);
VIR_ENUM_IMPL(virDomainChr, VIR_DOMAIN_CHR_TYPE_LAST,
"null",
@@ -504,28 +538,33 @@ VIR_ENUM_IMPL(virDomainChr, VIR_DOMAIN_CHR_TYPE_LAST,
"unix",
"spicevmc",
"spiceport",
- "nmdm");
+ "nmdm",
+);
VIR_ENUM_IMPL(virDomainChrTcpProtocol, VIR_DOMAIN_CHR_TCP_PROTOCOL_LAST,
"raw",
"telnet",
"telnets",
- "tls");
+ "tls",
+);
VIR_ENUM_IMPL(virDomainChrSpicevmc, VIR_DOMAIN_CHR_SPICEVMC_LAST,
"vdagent",
"smartcard",
- "usbredir");
+ "usbredir",
+);
VIR_ENUM_IMPL(virDomainSmartcard, VIR_DOMAIN_SMARTCARD_TYPE_LAST,
"host",
"host-certificates",
- "passthrough");
+ "passthrough",
+);
VIR_ENUM_IMPL(virDomainSoundCodec, VIR_DOMAIN_SOUND_CODEC_TYPE_LAST,
"duplex",
"micro",
- "output");
+ "output",
+);
VIR_ENUM_IMPL(virDomainSoundModel, VIR_DOMAIN_SOUND_MODEL_LAST,
"sb16",
@@ -534,12 +573,14 @@ VIR_ENUM_IMPL(virDomainSoundModel, VIR_DOMAIN_SOUND_MODEL_LAST,
"ac97",
"ich6",
"ich9",
- "usb");
+ "usb",
+);
VIR_ENUM_IMPL(virDomainKeyWrapCipherName,
VIR_DOMAIN_KEY_WRAP_CIPHER_NAME_LAST,
"aes",
- "dea");
+ "dea",
+);
VIR_ENUM_IMPL(virDomainMemballoonModel, VIR_DOMAIN_MEMBALLOON_MODEL_LAST,
"virtio",
@@ -550,12 +591,14 @@ VIR_ENUM_IMPL(virDomainSmbiosMode, VIR_DOMAIN_SMBIOS_LAST,
"none",
"emulate",
"host",
- "sysinfo");
+ "sysinfo",
+);
VIR_ENUM_IMPL(virDomainWatchdogModel, VIR_DOMAIN_WATCHDOG_MODEL_LAST,
"i6300esb",
"ib700",
- "diag288");
+ "diag288",
+);
VIR_ENUM_IMPL(virDomainWatchdogAction, VIR_DOMAIN_WATCHDOG_ACTION_LAST,
"reset",
@@ -564,14 +607,16 @@ VIR_ENUM_IMPL(virDomainWatchdogAction,
VIR_DOMAIN_WATCHDOG_ACTION_LAST,
"pause",
"dump",
"none",
- "inject-nmi");
+ "inject-nmi",
+);
VIR_ENUM_IMPL(virDomainPanicModel, VIR_DOMAIN_PANIC_MODEL_LAST,
"default",
"isa",
"pseries",
"hyperv",
- "s390");
+ "s390",
+);
VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
"default",
@@ -584,25 +629,29 @@ VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
"parallels",
"virtio",
"gop",
- "none");
+ "none",
+);
VIR_ENUM_IMPL(virDomainVideoVGAConf, VIR_DOMAIN_VIDEO_VGACONF_LAST,
"io",
"on",
- "off");
+ "off",
+);
VIR_ENUM_IMPL(virDomainInput, VIR_DOMAIN_INPUT_TYPE_LAST,
"mouse",
"tablet",
"keyboard",
- "passthrough");
+ "passthrough",
+);
VIR_ENUM_IMPL(virDomainInputBus, VIR_DOMAIN_INPUT_BUS_LAST,
"ps2",
"usb",
"xen",
"parallels",
- "virtio");
+ "virtio",
+);
VIR_ENUM_IMPL(virDomainGraphics, VIR_DOMAIN_GRAPHICS_TYPE_LAST,
"sdl",
@@ -610,27 +659,31 @@ VIR_ENUM_IMPL(virDomainGraphics, VIR_DOMAIN_GRAPHICS_TYPE_LAST,
"rdp",
"desktop",
"spice",
- "egl-headless");
+ "egl-headless",
+);
VIR_ENUM_IMPL(virDomainGraphicsListen, VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST,
"none",
"address",
"network",
- "socket");
+ "socket",
+);
VIR_ENUM_IMPL(virDomainGraphicsAuthConnected,
VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_LAST,
"default",
"fail",
"disconnect",
- "keep");
+ "keep",
+);
VIR_ENUM_IMPL(virDomainGraphicsVNCSharePolicy,
VIR_DOMAIN_GRAPHICS_VNC_SHARE_LAST,
"default",
"allow-exclusive",
"force-shared",
- "ignore");
+ "ignore",
+);
VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName,
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST,
@@ -641,13 +694,15 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName,
"playback",
"record",
"smartcard",
- "usbredir");
+ "usbredir",
+);
VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelMode,
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_LAST,
"any",
"secure",
- "insecure");
+ "insecure",
+);
VIR_ENUM_IMPL(virDomainGraphicsSpiceImageCompression,
VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST,
@@ -657,73 +712,86 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceImageCompression,
"quic",
"glz",
"lz",
- "off");
+ "off",
+);
VIR_ENUM_IMPL(virDomainGraphicsSpiceJpegCompression,
VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST,
"default",
"auto",
"never",
- "always");
+ "always",
+);
VIR_ENUM_IMPL(virDomainGraphicsSpiceZlibCompression,
VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST,
"default",
"auto",
"never",
- "always");
+ "always",
+);
VIR_ENUM_IMPL(virDomainGraphicsSpiceMouseMode,
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST,
"default",
"server",
- "client");
+ "client",
+);
VIR_ENUM_IMPL(virDomainGraphicsSpiceStreamingMode,
VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_LAST,
"default",
"filter",
"all",
- "off");
+ "off",
+);
VIR_ENUM_IMPL(virDomainHostdevMode, VIR_DOMAIN_HOSTDEV_MODE_LAST,
"subsystem",
- "capabilities");
+ "capabilities",
+);
VIR_ENUM_IMPL(virDomainHostdevSubsys, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST,
"usb",
"pci",
"scsi",
"scsi_host",
- "mdev");
+ "mdev",
+);
VIR_ENUM_IMPL(virDomainHostdevSubsysPCIBackend,
VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST,
"default",
"kvm",
"vfio",
- "xen");
+ "xen",
+);
VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIProtocol,
VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_LAST,
"adapter",
- "iscsi");
+ "iscsi",
+);
VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIHostProtocol,
VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_LAST,
"none",
- "vhost");
+ "vhost",
+);
VIR_ENUM_IMPL(virDomainHostdevCaps, VIR_DOMAIN_HOSTDEV_CAPS_TYPE_LAST,
"storage",
"misc",
- "net");
+ "net",
+);
VIR_ENUM_IMPL(virDomainHub, VIR_DOMAIN_HUB_TYPE_LAST,
- "usb");
+ "usb",
+);
VIR_ENUM_IMPL(virDomainRedirdevBus, VIR_DOMAIN_REDIRDEV_BUS_LAST,
- "usb");
+ "usb",
+);
VIR_ENUM_IMPL(virDomainState, VIR_DOMAIN_LAST,
"nostate",
@@ -733,10 +801,12 @@ VIR_ENUM_IMPL(virDomainState, VIR_DOMAIN_LAST,
"shutdown",
"shutoff",
"crashed",
- "pmsuspended");
+ "pmsuspended",
+);
VIR_ENUM_IMPL(virDomainNostateReason, VIR_DOMAIN_NOSTATE_LAST,
- "unknown");
+ "unknown",
+);
VIR_ENUM_IMPL(virDomainRunningReason, VIR_DOMAIN_RUNNING_LAST,
"unknown",
@@ -749,10 +819,12 @@ VIR_ENUM_IMPL(virDomainRunningReason, VIR_DOMAIN_RUNNING_LAST,
"save canceled",
"wakeup",
"crashed",
- "post-copy");
+ "post-copy",
+);
VIR_ENUM_IMPL(virDomainBlockedReason, VIR_DOMAIN_BLOCKED_LAST,
- "unknown");
+ "unknown",
+);
VIR_ENUM_IMPL(virDomainPausedReason, VIR_DOMAIN_PAUSED_LAST,
"unknown",
@@ -768,11 +840,13 @@ VIR_ENUM_IMPL(virDomainPausedReason, VIR_DOMAIN_PAUSED_LAST,
"panicked",
"starting up",
"post-copy",
- "post-copy failed");
+ "post-copy failed",
+);
VIR_ENUM_IMPL(virDomainShutdownReason, VIR_DOMAIN_SHUTDOWN_LAST,
"unknown",
- "user");
+ "user",
+);
VIR_ENUM_IMPL(virDomainShutoffReason, VIR_DOMAIN_SHUTOFF_LAST,
"unknown",
@@ -783,30 +857,36 @@ VIR_ENUM_IMPL(virDomainShutoffReason, VIR_DOMAIN_SHUTOFF_LAST,
"saved",
"failed",
"from snapshot",
- "daemon");
+ "daemon",
+);
VIR_ENUM_IMPL(virDomainCrashedReason, VIR_DOMAIN_CRASHED_LAST,
"unknown",
- "panicked");
+ "panicked",
+);
VIR_ENUM_IMPL(virDomainPMSuspendedReason, VIR_DOMAIN_PMSUSPENDED_LAST,
- "unknown");
+ "unknown",
+);
VIR_ENUM_IMPL(virDomainSeclabel, VIR_DOMAIN_SECLABEL_LAST,
"default",
"none",
"dynamic",
- "static");
+ "static",
+);
VIR_ENUM_IMPL(virDomainClockOffset, VIR_DOMAIN_CLOCK_OFFSET_LAST,
"utc",
"localtime",
"variable",
- "timezone");
+ "timezone",
+);
VIR_ENUM_IMPL(virDomainClockBasis, VIR_DOMAIN_CLOCK_BASIS_LAST,
"utc",
- "localtime");
+ "localtime",
+);
VIR_ENUM_IMPL(virDomainTimerName, VIR_DOMAIN_TIMER_NAME_LAST,
"platform",
@@ -815,39 +895,46 @@ VIR_ENUM_IMPL(virDomainTimerName, VIR_DOMAIN_TIMER_NAME_LAST,
"hpet",
"tsc",
"kvmclock",
- "hypervclock");
+ "hypervclock",
+);
VIR_ENUM_IMPL(virDomainTimerTrack, VIR_DOMAIN_TIMER_TRACK_LAST,
"boot",
"guest",
- "wall");
+ "wall",
+);
VIR_ENUM_IMPL(virDomainTimerTickpolicy, VIR_DOMAIN_TIMER_TICKPOLICY_LAST,
"delay",
"catchup",
"merge",
- "discard");
+ "discard",
+);
VIR_ENUM_IMPL(virDomainTimerMode, VIR_DOMAIN_TIMER_MODE_LAST,
"auto",
"native",
"emulate",
"paravirt",
- "smpsafe");
+ "smpsafe",
+);
VIR_ENUM_IMPL(virDomainStartupPolicy, VIR_DOMAIN_STARTUP_POLICY_LAST,
"default",
"mandatory",
"requisite",
- "optional");
+ "optional",
+);
VIR_ENUM_IMPL(virDomainCpuPlacementMode, VIR_DOMAIN_CPU_PLACEMENT_MODE_LAST,
"static",
- "auto");
+ "auto",
+);
VIR_ENUM_IMPL(virDomainDiskTray, VIR_DOMAIN_DISK_TRAY_LAST,
"closed",
- "open");
+ "open",
+);
VIR_ENUM_IMPL(virDomainRNGModel,
VIR_DOMAIN_RNG_MODEL_LAST,
@@ -856,23 +943,28 @@ VIR_ENUM_IMPL(virDomainRNGModel,
VIR_ENUM_IMPL(virDomainRNGBackend,
VIR_DOMAIN_RNG_BACKEND_LAST,
"random",
- "egd");
+ "egd",
+);
VIR_ENUM_IMPL(virDomainTPMModel, VIR_DOMAIN_TPM_MODEL_LAST,
"tpm-tis",
- "tpm-crb");
+ "tpm-crb",
+);
VIR_ENUM_IMPL(virDomainTPMBackend, VIR_DOMAIN_TPM_TYPE_LAST,
"passthrough",
- "emulator");
+ "emulator",
+);
VIR_ENUM_IMPL(virDomainTPMVersion, VIR_DOMAIN_TPM_VERSION_LAST,
"default",
"1.2",
- "2.0");
+ "2.0",
+);
VIR_ENUM_IMPL(virDomainIOMMUModel, VIR_DOMAIN_IOMMU_MODEL_LAST,
- "intel");
+ "intel",
+);
VIR_ENUM_IMPL(virDomainVsockModel, VIR_DOMAIN_VSOCK_MODEL_LAST,
"default",
@@ -881,41 +973,48 @@ VIR_ENUM_IMPL(virDomainVsockModel, VIR_DOMAIN_VSOCK_MODEL_LAST,
VIR_ENUM_IMPL(virDomainDiskDiscard, VIR_DOMAIN_DISK_DISCARD_LAST,
"default",
"unmap",
- "ignore");
+ "ignore",
+);
VIR_ENUM_IMPL(virDomainDiskDetectZeroes, VIR_DOMAIN_DISK_DETECT_ZEROES_LAST,
"default",
"off",
"on",
- "unmap");
+ "unmap",
+);
VIR_ENUM_IMPL(virDomainDiskMirrorState, VIR_DOMAIN_DISK_MIRROR_STATE_LAST,
"none",
"yes",
"abort",
- "pivot");
+ "pivot",
+);
VIR_ENUM_IMPL(virDomainMemorySource, VIR_DOMAIN_MEMORY_SOURCE_LAST,
"none",
"file",
"anonymous",
- "memfd");
+ "memfd",
+);
VIR_ENUM_IMPL(virDomainMemoryAllocation, VIR_DOMAIN_MEMORY_ALLOCATION_LAST,
"none",
"immediate",
- "ondemand");
+ "ondemand",
+);
VIR_ENUM_IMPL(virDomainLoader,
VIR_DOMAIN_LOADER_TYPE_LAST,
"rom",
- "pflash");
+ "pflash",
+);
VIR_ENUM_IMPL(virDomainIOAPIC,
VIR_DOMAIN_IOAPIC_LAST,
"none",
"qemu",
- "kvm");
+ "kvm",
+);
VIR_ENUM_IMPL(virDomainHPTResizing,
VIR_DOMAIN_HPT_RESIZING_LAST,
@@ -929,22 +1028,26 @@ VIR_ENUM_IMPL(virDomainHPTResizing,
* <mirror> XML (remaining types are not two-phase). */
VIR_ENUM_DECL(virDomainBlockJob);
VIR_ENUM_IMPL(virDomainBlockJob, VIR_DOMAIN_BLOCK_JOB_TYPE_LAST,
- "", "", "copy", "",
"active-commit");
+ "", "", "copy", "",
"active-commit",
+);
VIR_ENUM_IMPL(virDomainMemoryModel,
VIR_DOMAIN_MEMORY_MODEL_LAST,
"",
"dimm",
- "nvdimm");
+ "nvdimm",
+);
VIR_ENUM_IMPL(virDomainShmemModel, VIR_DOMAIN_SHMEM_MODEL_LAST,
"ivshmem",
"ivshmem-plain",
- "ivshmem-doorbell");
+ "ivshmem-doorbell",
+);
VIR_ENUM_IMPL(virDomainLaunchSecurity, VIR_DOMAIN_LAUNCH_SECURITY_LAST,
"",
- "sev");
+ "sev",
+);
static virClassPtr virDomainObjClass;
static virClassPtr virDomainXMLOptionClass;
diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index b83cfedc13..b134ff4adc 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -33,7 +33,8 @@
VIR_ENUM_IMPL(virInterface,
VIR_INTERFACE_TYPE_LAST,
- "ethernet", "bridge", "bond",
"vlan");
+ "ethernet", "bridge", "bond",
"vlan",
+);
static virInterfaceDefPtr
virInterfaceDefParseXML(xmlXPathContextPtr ctxt, int parentIfType);
diff --git a/src/conf/netdev_vlan_conf.c b/src/conf/netdev_vlan_conf.c
index b29bc81366..57d73ed86e 100644
--- a/src/conf/netdev_vlan_conf.c
+++ b/src/conf/netdev_vlan_conf.c
@@ -25,7 +25,8 @@
#define VIR_FROM_THIS VIR_FROM_NONE
VIR_ENUM_IMPL(virNativeVlanMode, VIR_NATIVE_VLAN_MODE_LAST,
- "default", "tagged", "untagged");
+ "default", "tagged", "untagged",
+);
int
virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlanPtr def)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 0050eb3194..57fba31f6d 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -47,25 +47,30 @@ VIR_ENUM_IMPL(virNetworkForward,
VIR_NETWORK_FORWARD_LAST,
"none", "nat", "route", "open",
"bridge", "private", "vepa",
"passthrough",
- "hostdev");
+ "hostdev",
+);
VIR_ENUM_IMPL(virNetworkBridgeMACTableManager,
VIR_NETWORK_BRIDGE_MAC_TABLE_MANAGER_LAST,
- "default", "kernel", "libvirt");
+ "default", "kernel", "libvirt",
+);
VIR_ENUM_DECL(virNetworkForwardHostdevDevice);
VIR_ENUM_IMPL(virNetworkForwardHostdevDevice,
VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_LAST,
- "none", "pci", "netdev");
+ "none", "pci", "netdev",
+);
VIR_ENUM_IMPL(virNetworkForwardDriverName,
VIR_NETWORK_FORWARD_DRIVER_NAME_LAST,
"default",
"kvm",
- "vfio");
+ "vfio",
+);
VIR_ENUM_IMPL(virNetworkTaint, VIR_NETWORK_TAINT_LAST,
- "hook-script");
+ "hook-script",
+);
static void
virPortGroupDefClear(virPortGroupDefPtr def)
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 0a3ae2d3bb..1b1f57d065 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -44,7 +44,8 @@ VIR_LOG_INIT("conf.node_device_conf");
VIR_ENUM_IMPL(virNodeDevDevnode, VIR_NODE_DEV_DEVNODE_LAST,
"dev",
- "link");
+ "link",
+);
VIR_ENUM_IMPL(virNodeDevCap, VIR_NODE_DEV_CAP_LAST,
"system",
@@ -62,16 +63,19 @@ VIR_ENUM_IMPL(virNodeDevCap, VIR_NODE_DEV_CAP_LAST,
"drm",
"mdev_types",
"mdev",
- "ccw");
+ "ccw",
+);
VIR_ENUM_IMPL(virNodeDevNetCap, VIR_NODE_DEV_CAP_NET_LAST,
"80203",
- "80211");
+ "80211",
+);
VIR_ENUM_IMPL(virNodeDevDRM, VIR_NODE_DEV_DRM_LAST,
"primary",
"control",
- "render");
+ "render",
+);
static int
virNodeDevCapsDefParseString(const char *xpath,
diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index 3647648807..9d5bc3a394 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -42,18 +42,21 @@ VIR_ENUM_IMPL(virDomainNumatuneMemMode,
VIR_DOMAIN_NUMATUNE_MEM_LAST,
"strict",
"preferred",
- "interleave");
+ "interleave",
+);
VIR_ENUM_IMPL(virDomainNumatunePlacement,
VIR_DOMAIN_NUMATUNE_PLACEMENT_LAST,
"default",
"static",
- "auto");
+ "auto",
+);
VIR_ENUM_IMPL(virDomainMemoryAccess, VIR_DOMAIN_MEMORY_ACCESS_LAST,
"default",
"shared",
- "private");
+ "private",
+);
typedef struct _virDomainNumaDistance virDomainNumaDistance;
typedef virDomainNumaDistance *virDomainNumaDistancePtr;
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 8dcdc9d8d2..7cad3ccc57 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -54,28 +54,33 @@ VIR_ENUM_IMPL(virNWFilterRuleAction, VIR_NWFILTER_RULE_ACTION_LAST,
"accept",
"reject",
"return",
- "continue");
+ "continue",
+);
VIR_ENUM_IMPL(virNWFilterJumpTarget, VIR_NWFILTER_RULE_ACTION_LAST,
"DROP",
"ACCEPT",
"REJECT",
"RETURN",
- "CONTINUE");
+ "CONTINUE",
+);
VIR_ENUM_IMPL(virNWFilterRuleDirection, VIR_NWFILTER_RULE_DIRECTION_LAST,
"in",
"out",
- "inout");
+ "inout",
+);
VIR_ENUM_IMPL(virNWFilterChainPolicy, VIR_NWFILTER_CHAIN_POLICY_LAST,
"ACCEPT",
- "DROP");
+ "DROP",
+);
VIR_ENUM_IMPL(virNWFilterEbtablesTable, VIR_NWFILTER_EBTABLES_TABLE_LAST,
"filter",
"nat",
- "broute");
+ "broute",
+);
VIR_ENUM_IMPL(virNWFilterChainSuffix, VIR_NWFILTER_CHAINSUFFIX_LAST,
"root",
@@ -85,7 +90,8 @@ VIR_ENUM_IMPL(virNWFilterChainSuffix, VIR_NWFILTER_CHAINSUFFIX_LAST,
"arp",
"rarp",
"ipv4",
- "ipv6");
+ "ipv6",
+);
VIR_ENUM_IMPL(virNWFilterRuleProtocol, VIR_NWFILTER_RULE_PROTOCOL_LAST,
"none",
@@ -112,7 +118,8 @@ VIR_ENUM_IMPL(virNWFilterRuleProtocol,
VIR_NWFILTER_RULE_PROTOCOL_LAST,
"esp-ipv6",
"ah-ipv6",
"sctp-ipv6",
- "all-ipv6");
+ "all-ipv6",
+);
/*
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index c986c8b728..b16f450a01 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -54,7 +54,8 @@ VIR_ENUM_IMPL(virDomainSnapshotLocation,
VIR_DOMAIN_SNAPSHOT_LOCATION_LAST,
"default",
"no",
"internal",
- "external");
+ "external",
+);
/* virDomainSnapshotState is really virDomainState plus one extra state */
VIR_ENUM_IMPL(virDomainSnapshotState, VIR_DOMAIN_SNAPSHOT_STATE_LAST,
@@ -66,7 +67,8 @@ VIR_ENUM_IMPL(virDomainSnapshotState, VIR_DOMAIN_SNAPSHOT_STATE_LAST,
"shutoff",
"crashed",
"pmsuspended",
- "disk-snapshot");
+ "disk-snapshot",
+);
struct _virDomainSnapshotObjList {
/* name string -> virDomainSnapshotObj mapping
diff --git a/src/conf/storage_adapter_conf.c b/src/conf/storage_adapter_conf.c
index 6505d2576b..3118b1a310 100644
--- a/src/conf/storage_adapter_conf.c
+++ b/src/conf/storage_adapter_conf.c
@@ -34,7 +34,8 @@ VIR_LOG_INIT("conf.storage_adapter_conf");
VIR_ENUM_IMPL(virStorageAdapter,
VIR_STORAGE_ADAPTER_TYPE_LAST,
- "default", "scsi_host", "fc_host");
+ "default", "scsi_host", "fc_host",
+);
static void
virStorageAdapterClearFCHost(virStorageAdapterFCHostPtr fchost)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 0bc29b7647..9cce346b1b 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -50,7 +50,8 @@ VIR_LOG_INIT("conf.storage_conf");
VIR_ENUM_IMPL(virStorageVol,
VIR_STORAGE_VOL_LAST,
"file", "block", "dir", "network",
- "netdir", "ploop");
+ "netdir", "ploop",
+);
VIR_ENUM_IMPL(virStoragePool,
VIR_STORAGE_POOL_LAST,
@@ -58,26 +59,31 @@ VIR_ENUM_IMPL(virStoragePool,
"logical", "disk", "iscsi",
"iscsi-direct", "scsi", "mpath",
"rbd", "sheepdog", "gluster",
- "zfs", "vstorage");
+ "zfs", "vstorage",
+);
VIR_ENUM_IMPL(virStoragePoolFormatFileSystem,
VIR_STORAGE_POOL_FS_LAST,
"auto", "ext2", "ext3",
"ext4", "ufs", "iso9660", "udf",
- "gfs", "gfs2", "vfat", "hfs+",
"xfs", "ocfs2");
+ "gfs", "gfs2", "vfat", "hfs+",
"xfs", "ocfs2",
+);
VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet,
VIR_STORAGE_POOL_NETFS_LAST,
- "auto", "nfs", "glusterfs",
"cifs");
+ "auto", "nfs", "glusterfs",
"cifs",
+);
VIR_ENUM_IMPL(virStoragePoolFormatDisk,
VIR_STORAGE_POOL_DISK_LAST,
"unknown", "dos", "dvh", "gpt",
- "mac", "bsd", "pc98", "sun",
"lvm2");
+ "mac", "bsd", "pc98", "sun",
"lvm2",
+);
VIR_ENUM_IMPL(virStoragePoolFormatLogical,
VIR_STORAGE_POOL_LOGICAL_LAST,
- "unknown", "lvm2");
+ "unknown", "lvm2",
+);
VIR_ENUM_IMPL(virStorageVolFormatDisk,
@@ -85,14 +91,16 @@ VIR_ENUM_IMPL(virStorageVolFormatDisk,
"none", "linux", "fat16",
"fat32", "linux-swap",
"linux-lvm", "linux-raid",
- "extended");
+ "extended",
+);
VIR_ENUM_IMPL(virStoragePartedFs,
VIR_STORAGE_PARTED_FS_TYPE_LAST,
"ext2", "ext2", "fat16",
"fat32", "linux-swap",
"ext2", "ext2",
- "extended");
+ "extended",
+);
typedef const char *(*virStorageVolFormatToString)(int format);
typedef int (*virStorageVolFormatFromString)(const char *format);
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index dd38077a88..d204e60ca0 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -94,7 +94,8 @@ VIR_ENUM_IMPL(virDaemonErr, VIR_LOCK_DAEMON_ERR_LAST,
"Unable to initialize network sockets",
"Unable to load configuration file",
"Unable to look for hook scripts",
- "Unable to re-execute daemon");
+ "Unable to re-execute daemon",
+);
static void *
virLockDaemonClientNew(virNetServerClientPtr client,
diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
index c9a05bd12b..36da4860ff 100644
--- a/src/logging/log_daemon.c
+++ b/src/logging/log_daemon.c
@@ -90,7 +90,8 @@ VIR_ENUM_IMPL(virDaemonErr, VIR_LOG_DAEMON_ERR_LAST,
"Unable to initialize network sockets",
"Unable to load configuration file",
"Unable to look for hook scripts",
- "Unable to re-execute daemon");
+ "Unable to re-execute daemon",
+);
static void *
virLogDaemonClientNew(virNetServerClientPtr client,
diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c
index 8f16b5f7c8..a1cdbdca2c 100644
--- a/src/lxc/lxc_domain.c
+++ b/src/lxc/lxc_domain.c
@@ -183,14 +183,16 @@ VIR_ENUM_IMPL(virLXCDomainNamespace,
VIR_LXC_DOMAIN_NAMESPACE_LAST,
"sharenet",
"shareipc",
- "shareuts");
+ "shareuts",
+);
VIR_ENUM_IMPL(virLXCDomainNamespaceSource,
VIR_LXC_DOMAIN_NAMESPACE_SOURCE_LAST,
"none",
"name",
"pid",
- "netns");
+ "netns",
+);
static void
lxcDomainDefNamespaceFree(void *nsdata)
diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
index d59ef34f20..21119b3fbb 100644
--- a/src/network/leaseshelper.c
+++ b/src/network/leaseshelper.c
@@ -73,7 +73,8 @@ enum virLeaseActionFlags {
VIR_ENUM_DECL(virLeaseAction);
VIR_ENUM_IMPL(virLeaseAction, VIR_LEASE_ACTION_LAST,
- "add", "old", "del", "init");
+ "add", "old", "del", "init",
+);
int
main(int argc, char **argv)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 945b0d6746..ea62b4b4a5 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -1216,7 +1216,8 @@ VIR_ENUM_DECL(qemuAgentShutdownMode);
VIR_ENUM_IMPL(qemuAgentShutdownMode,
QEMU_AGENT_SHUTDOWN_LAST,
- "powerdown", "reboot", "halt");
+ "powerdown", "reboot", "halt",
+);
int qemuAgentShutdown(qemuAgentPtr mon,
qemuAgentShutdownMode mode)
@@ -1337,7 +1338,8 @@ VIR_ENUM_IMPL(qemuAgentSuspendMode,
VIR_NODE_SUSPEND_TARGET_LAST,
"guest-suspend-ram",
"guest-suspend-disk",
- "guest-suspend-hybrid");
+ "guest-suspend-hybrid",
+);
int
qemuAgentSuspend(qemuAgentPtr mon,
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 555ee19c39..6327965752 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -80,7 +80,8 @@ VIR_ENUM_IMPL(virDomainDiskQEMUBus, VIR_DOMAIN_DISK_BUS_LAST,
"usb",
"uml",
"sata",
- "sd");
+ "sd",
+);
VIR_ENUM_DECL(qemuDiskCacheV2);
@@ -91,7 +92,8 @@ VIR_ENUM_IMPL(qemuDiskCacheV2, VIR_DOMAIN_DISK_CACHE_LAST,
"writethrough",
"writeback",
"directsync",
- "unsafe");
+ "unsafe",
+);
VIR_ENUM_IMPL(qemuVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
"", /* default value, we shouldn't see this */
@@ -104,7 +106,8 @@ VIR_ENUM_IMPL(qemuVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
"", /* don't support parallels */
"", /* no need for virtio */
"" /* don't support gop */,
- "" /* 'none' doesn't make sense here */);
+ "" /* 'none' doesn't make sense here */,
+);
VIR_ENUM_DECL(qemuDeviceVideo);
@@ -119,7 +122,8 @@ VIR_ENUM_IMPL(qemuDeviceVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
"", /* don't support parallels */
"virtio-vga",
"" /* don't support gop */,
- "" /* 'none' doesn't make sense here */);
+ "" /* 'none' doesn't make sense here */,
+);
VIR_ENUM_DECL(qemuDeviceVideoSecondary);
@@ -134,14 +138,16 @@ VIR_ENUM_IMPL(qemuDeviceVideoSecondary, VIR_DOMAIN_VIDEO_TYPE_LAST,
"", /* don't support parallels */
"virtio-gpu",
"" /* don't support gop */,
- "" /* 'none' doesn't make sense here */);
+ "" /* 'none' doesn't make sense here */,
+);
VIR_ENUM_DECL(qemuSoundCodec);
VIR_ENUM_IMPL(qemuSoundCodec, VIR_DOMAIN_SOUND_CODEC_TYPE_LAST,
"hda-duplex",
"hda-micro",
- "hda-output");
+ "hda-output",
+);
VIR_ENUM_DECL(qemuControllerModelUSB);
@@ -159,7 +165,8 @@ VIR_ENUM_IMPL(qemuControllerModelUSB,
VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST,
"qusb1",
"qusb2",
"qemu-xhci",
- "none");
+ "none",
+);
VIR_ENUM_DECL(qemuDomainFSDriver);
VIR_ENUM_IMPL(qemuDomainFSDriver, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
@@ -168,13 +175,15 @@ VIR_ENUM_IMPL(qemuDomainFSDriver, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
"handle",
NULL,
NULL,
- NULL);
+ NULL,
+);
VIR_ENUM_DECL(qemuNumaPolicy);
VIR_ENUM_IMPL(qemuNumaPolicy, VIR_DOMAIN_NUMATUNE_MEM_LAST,
"bind",
"preferred",
- "interleave");
+ "interleave",
+);
/**
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 4b371317af..55f0c61f8e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2753,14 +2753,16 @@ VIR_ENUM_IMPL(qemuSaveCompression, QEMU_SAVE_FORMAT_LAST,
"gzip",
"bzip2",
"xz",
- "lzop");
+ "lzop",
+);
VIR_ENUM_DECL(qemuDumpFormat);
VIR_ENUM_IMPL(qemuDumpFormat, VIR_DOMAIN_CORE_DUMP_FORMAT_LAST,
"elf",
"kdump-zlib",
"kdump-lzo",
- "kdump-snappy");
+ "kdump-snappy",
+);
typedef struct _virQEMUSaveHeader virQEMUSaveHeader;
typedef virQEMUSaveHeader *virQEMUSaveHeaderPtr;
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index d62352cb6e..ae2546f98b 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -50,7 +50,8 @@ VIR_ENUM_IMPL(qemuMigrationCookieFlag,
"cpu-hotplug",
"cpu",
"allowReboot",
- "capabilities");
+ "capabilities",
+);
static void
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index a7c8a13298..8bd4d4d761 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -174,13 +174,15 @@ VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
"active", "pre-switchover",
"device", "postcopy-active",
"completed", "failed",
- "cancelling", "cancelled");
+ "cancelling", "cancelled",
+);
VIR_ENUM_IMPL(qemuMonitorVMStatus,
QEMU_MONITOR_VM_STATUS_LAST,
"debug", "inmigrate", "internal-error",
"io-error", "paused",
"postmigrate", "prelaunch", "finish-migrate",
"restore-vm",
- "running", "save-vm", "shutdown",
"watchdog", "guest-panicked");
+ "running", "save-vm", "shutdown",
"watchdog", "guest-panicked",
+);
typedef enum {
QEMU_MONITOR_BLOCK_IO_STATUS_OK,
@@ -194,11 +196,13 @@ VIR_ENUM_DECL(qemuMonitorBlockIOStatus);
VIR_ENUM_IMPL(qemuMonitorBlockIOStatus,
QEMU_MONITOR_BLOCK_IO_STATUS_LAST,
- "ok", "failed", "nospace");
+ "ok", "failed", "nospace",
+);
VIR_ENUM_IMPL(qemuMonitorDumpStatus,
QEMU_MONITOR_DUMP_STATUS_LAST,
- "none", "active", "completed",
"failed");
+ "none", "active", "completed",
"failed",
+);
char *
qemuMonitorEscapeArg(const char *in)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 5d3b1bd056..8bafa93c8d 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -736,7 +736,8 @@ static void qemuMonitorJSONHandleRTCChange(qemuMonitorPtr mon,
virJSONValuePtr d
VIR_ENUM_DECL(qemuMonitorWatchdogAction);
VIR_ENUM_IMPL(qemuMonitorWatchdogAction, VIR_DOMAIN_EVENT_WATCHDOG_LAST,
- "none", "pause", "reset",
"poweroff", "shutdown", "debug", "inject-nmi");
+ "none", "pause", "reset",
"poweroff", "shutdown", "debug", "inject-nmi",
+);
static void qemuMonitorJSONHandleWatchdog(qemuMonitorPtr mon, virJSONValuePtr data)
{
@@ -757,7 +758,8 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitorPtr mon,
virJSONValuePtr da
VIR_ENUM_DECL(qemuMonitorIOErrorAction);
VIR_ENUM_IMPL(qemuMonitorIOErrorAction, VIR_DOMAIN_EVENT_IO_ERROR_LAST,
- "ignore", "stop", "report");
+ "ignore", "stop", "report",
+);
static void
@@ -799,7 +801,8 @@ qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr
data)
VIR_ENUM_DECL(qemuMonitorGraphicsAddressFamily);
VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily,
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST,
- "ipv4", "ipv6", "unix");
+ "ipv4", "ipv6", "unix",
+);
static void
qemuMonitorJSONHandleGraphicsVNC(qemuMonitorPtr mon,
@@ -5497,7 +5500,8 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
VIR_ENUM_IMPL(qemuMonitorCPUProperty,
QEMU_MONITOR_CPU_PROPERTY_LAST,
- "boolean", "string", "number");
+ "boolean", "string", "number",
+);
static int
qemuMonitorJSONParseCPUModelProperty(const char *key,
diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c
index 4014621f73..54ddfc42a0 100644
--- a/src/remote/remote_daemon.c
+++ b/src/remote/remote_daemon.c
@@ -101,7 +101,8 @@ VIR_ENUM_IMPL(virDaemonErr, VIR_DAEMON_ERR_LAST,
"Unable to load configuration file",
"Unable to look for hook scripts",
"Unable to initialize audit system",
- "Unable to initialize driver");
+ "Unable to initialize driver",
+);
static int daemonForkIntoBackground(const char *argv0)
{
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 3ebb3b0a0f..de2c925474 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -65,7 +65,8 @@ VIR_LOG_INIT("util.cgroup");
VIR_ENUM_IMPL(virCgroupController, VIR_CGROUP_CONTROLLER_LAST,
"cpu", "cpuacct", "cpuset",
"memory", "devices",
"freezer", "blkio", "net_cls",
"perf_event",
- "name=systemd");
+ "name=systemd",
+);
/**
diff --git a/src/util/vircgroupbackend.c b/src/util/vircgroupbackend.c
index f85da0041d..06fbb2217d 100644
--- a/src/util/vircgroupbackend.c
+++ b/src/util/vircgroupbackend.c
@@ -32,7 +32,8 @@
VIR_ENUM_DECL(virCgroupBackend);
VIR_ENUM_IMPL(virCgroupBackend, VIR_CGROUP_BACKEND_TYPE_LAST,
"cgroup V2",
- "cgroup V1");
+ "cgroup V1",
+);
static virOnceControl virCgroupBackendOnce = VIR_ONCE_CONTROL_INITIALIZER;
static virCgroupBackendPtr virCgroupBackends[VIR_CGROUP_BACKEND_TYPE_LAST] = { 0 };
diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c
index f6707e4894..14b3b6a45d 100644
--- a/src/util/vircgroupv1.c
+++ b/src/util/vircgroupv1.c
@@ -49,7 +49,8 @@ VIR_ENUM_DECL(virCgroupV1Controller);
VIR_ENUM_IMPL(virCgroupV1Controller, VIR_CGROUP_CONTROLLER_LAST,
"cpu", "cpuacct", "cpuset",
"memory", "devices",
"freezer", "blkio", "net_cls",
"perf_event",
- "name=systemd");
+ "name=systemd",
+);
#ifdef __linux__
diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index cd58491da1..655abfe42e 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -45,7 +45,8 @@ VIR_LOG_INIT("util.cgroup");
VIR_ENUM_DECL(virCgroupV2Controller);
VIR_ENUM_IMPL(virCgroupV2Controller, VIR_CGROUP_CONTROLLER_LAST,
"cpu", "cpuacct", "cpuset",
"memory", "devices",
- "freezer", "io", "net_cls",
"perf_event", "name=systemd");
+ "freezer", "io", "net_cls",
"perf_event", "name=systemd",
+);
#ifdef __linux__
diff --git a/src/util/virconf.c b/src/util/virconf.c
index 4497972b1c..34a171bff8 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -70,7 +70,8 @@ VIR_ENUM_IMPL(virConf, VIR_CONF_LAST,
"long",
"unsigned long",
"string",
- "list");
+ "list",
+);
typedef struct _virConfEntry virConfEntry;
typedef virConfEntry *virConfEntryPtr;
diff --git a/src/util/virerror.c b/src/util/virerror.c
index 879a04f66a..b37b6b10dd 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -138,7 +138,7 @@ VIR_ENUM_IMPL(virErrorDomain, VIR_ERR_DOMAIN_LAST,
"Perf", /* 65 */
"Libssh transport layer",
"Resource control",
- );
+);
/*
diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index 7c54825b75..7045a42270 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -44,11 +44,13 @@ VIR_ENUM_DECL(virFirewallLayerCommand);
VIR_ENUM_IMPL(virFirewallLayerCommand, VIR_FIREWALL_LAYER_LAST,
EBTABLES_PATH,
IPTABLES_PATH,
- IP6TABLES_PATH);
+ IP6TABLES_PATH,
+);
VIR_ENUM_DECL(virFirewallLayerFirewallD);
VIR_ENUM_IMPL(virFirewallLayerFirewallD, VIR_FIREWALL_LAYER_LAST,
- "eb", "ipv4", "ipv6");
+ "eb", "ipv4", "ipv6",
+);
struct _virFirewallRule {
diff --git a/src/util/virgic.c b/src/util/virgic.c
index e980509630..9a8a07d33d 100644
--- a/src/util/virgic.c
+++ b/src/util/virgic.c
@@ -28,4 +28,4 @@ VIR_ENUM_IMPL(virGICVersion, VIR_GIC_VERSION_LAST,
"host",
"2",
"3",
- );
+);
diff --git a/src/util/virhook.c b/src/util/virhook.c
index a2d50301d7..37de0cb39e 100644
--- a/src/util/virhook.c
+++ b/src/util/virhook.c
@@ -55,17 +55,20 @@ VIR_ENUM_IMPL(virHookDriver,
"qemu",
"lxc",
"network",
- "libxl");
+ "libxl",
+);
VIR_ENUM_IMPL(virHookDaemonOp, VIR_HOOK_DAEMON_OP_LAST,
"start",
"shutdown",
- "reload");
+ "reload",
+);
VIR_ENUM_IMPL(virHookSubop, VIR_HOOK_SUBOP_LAST,
"-",
"begin",
- "end");
+ "end",
+);
VIR_ENUM_IMPL(virHookQemuOp, VIR_HOOK_QEMU_OP_LAST,
"start",
@@ -76,7 +79,8 @@ VIR_ENUM_IMPL(virHookQemuOp, VIR_HOOK_QEMU_OP_LAST,
"started",
"reconnect",
"attach",
- "restore");
+ "restore",
+);
VIR_ENUM_IMPL(virHookLxcOp, VIR_HOOK_LXC_OP_LAST,
"start",
@@ -84,7 +88,8 @@ VIR_ENUM_IMPL(virHookLxcOp, VIR_HOOK_LXC_OP_LAST,
"prepare",
"release",
"started",
- "reconnect");
+ "reconnect",
+);
VIR_ENUM_IMPL(virHookNetworkOp, VIR_HOOK_NETWORK_OP_LAST,
"start",
@@ -92,7 +97,8 @@ VIR_ENUM_IMPL(virHookNetworkOp, VIR_HOOK_NETWORK_OP_LAST,
"stopped",
"plugged",
"unplugged",
- "updated");
+ "updated",
+);
VIR_ENUM_IMPL(virHookLibxlOp, VIR_HOOK_LIBXL_OP_LAST,
"start",
@@ -101,7 +107,8 @@ VIR_ENUM_IMPL(virHookLibxlOp, VIR_HOOK_LIBXL_OP_LAST,
"release",
"migrate",
"started",
- "reconnect");
+ "reconnect",
+);
static int virHooksFound = -1;
diff --git a/src/util/virkeycode.c b/src/util/virkeycode.c
index 3f56118493..d5ce367b13 100644
--- a/src/util/virkeycode.c
+++ b/src/util/virkeycode.c
@@ -79,7 +79,7 @@ VIR_ENUM_IMPL(virKeycodeSet, VIR_KEYCODE_SET_LAST,
"usb",
"win32",
"qnum",
- );
+);
int virKeycodeValueFromString(virKeycodeSet codeset,
const char *keyname)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index 561a79528c..269a5f89d4 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -77,7 +77,8 @@ static char virLogHostname[HOST_NAME_MAX+1];
VIR_ENUM_DECL(virLogDestination);
VIR_ENUM_IMPL(virLogDestination, VIR_LOG_TO_OUTPUT_LAST,
- "stderr", "syslog", "file",
"journald");
+ "stderr", "syslog", "file",
"journald",
+);
/*
* Filters are used to refine the rules on what to keep or drop
diff --git a/src/util/virmdev.c b/src/util/virmdev.c
index 756e9f9c98..814dc55952 100644
--- a/src/util/virmdev.c
+++ b/src/util/virmdev.c
@@ -49,7 +49,8 @@ struct _virMediatedDeviceList {
VIR_ENUM_IMPL(virMediatedDeviceModel, VIR_MDEV_MODEL_TYPE_LAST,
"vfio-pci",
"vfio-ccw",
- "vfio-ap");
+ "vfio-ap",
+);
static virClassPtr virMediatedDeviceListClass;
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 236640c122..bb814dd212 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -2419,7 +2419,8 @@ VIR_ENUM_IMPL(virNetDevIfState,
"" /* value of zero means no state */,
"unknown", "notpresent",
"down", "lowerlayerdown",
- "testing", "dormant", "up");
+ "testing", "dormant", "up",
+);
VIR_ENUM_IMPL(virNetDevFeature,
VIR_NET_DEV_FEAT_LAST,
@@ -2436,7 +2437,8 @@ VIR_ENUM_IMPL(virNetDevFeature,
"rxhash",
"rdma",
"txudptnl",
- "switchdev");
+ "switchdev",
+);
#ifdef __linux__
int
@@ -2768,7 +2770,8 @@ VIR_ENUM_IMPL(virNetDevRxFilterMode,
VIR_NETDEV_RX_FILTER_MODE_LAST,
"none",
"normal",
- "all");
+ "all",
+);
static int virNetDevGetMulticastTable(const char *ifname,
diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index bb2e03a25b..c80a3a381f 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -36,7 +36,8 @@ VIR_ENUM_IMPL(virNetDevMacVLanMode, VIR_NETDEV_MACVLAN_MODE_LAST,
"vepa",
"private",
"bridge",
- "passthrough");
+ "passthrough",
+);
#if WITH_MACVTAP
# include <fcntl.h>
diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c
index 19ee0b58e2..574887e9e0 100644
--- a/src/util/virnetdevvportprofile.c
+++ b/src/util/virnetdevvportprofile.c
@@ -30,7 +30,8 @@ VIR_ENUM_IMPL(virNetDevVPort, VIR_NETDEV_VPORT_PROFILE_LAST,
"802.1Qbg",
"802.1Qbh",
"openvswitch",
- "midonet");
+ "midonet",
+);
VIR_ENUM_IMPL(virNetDevVPortProfileOp, VIR_NETDEV_VPORT_PROFILE_OP_LAST,
"create",
@@ -40,7 +41,8 @@ VIR_ENUM_IMPL(virNetDevVPortProfileOp,
VIR_NETDEV_VPORT_PROFILE_OP_LAST,
"migrate out",
"migrate in start",
"migrate in finish",
- "no-op");
+ "no-op",
+);
#if WITH_VIRTUALPORT
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 2248a12610..16a8a2ccc9 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -46,20 +46,21 @@ VIR_LOG_INIT("util.pci");
#define PCI_ADDR_LEN 13 /* "XXXX:XX:XX.X" */
VIR_ENUM_IMPL(virPCIELinkSpeed, VIR_PCIE_LINK_SPEED_LAST,
- "", "2.5", "5", "8",
"16");
+ "", "2.5", "5", "8",
"16",
+);
VIR_ENUM_IMPL(virPCIStubDriver, VIR_PCI_STUB_DRIVER_LAST,
"none",
"pciback", /* XEN */
"pci-stub", /* KVM */
"vfio-pci", /* VFIO */
- );
+);
VIR_ENUM_IMPL(virPCIHeader, VIR_PCI_HEADER_LAST,
"endpoint",
"pci-bridge",
"cardbus-bridge",
- );
+);
struct _virPCIDevice {
virPCIDeviceAddress address;
diff --git a/src/util/virperf.c b/src/util/virperf.c
index 7e5bfc6c78..65235dda6a 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -43,7 +43,8 @@ VIR_ENUM_IMPL(virPerfEvent, VIR_PERF_EVENT_LAST,
"cpu_clock", "task_clock", "page_faults",
"context_switches", "cpu_migrations",
"page_faults_min", "page_faults_maj",
- "alignment_faults", "emulation_faults");
+ "alignment_faults", "emulation_faults",
+);
struct virPerfEvent {
int fd;
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index 87f32464db..4e69228f34 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -112,7 +112,8 @@ VIR_ENUM_IMPL(virProcessSchedPolicy, VIR_PROC_POLICY_LAST,
"batch",
"idle",
"fifo",
- "rr");
+ "rr",
+);
/**
* virProcessTranslateStatus:
diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index 332aabb0fa..97891b2f8f 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -56,26 +56,30 @@ VIR_LOG_INIT("util.virresctrl");
VIR_ENUM_IMPL(virCacheKernel, VIR_CACHE_TYPE_LAST,
"Unified",
"Instruction",
- "Data");
+ "Data",
+);
/* Cache name mapping for our XML naming. */
VIR_ENUM_IMPL(virCache, VIR_CACHE_TYPE_LAST,
"both",
"code",
- "data");
+ "data",
+);
/* Cache name mapping for resctrl interface naming. */
VIR_ENUM_DECL(virResctrl);
VIR_ENUM_IMPL(virResctrl, VIR_CACHE_TYPE_LAST,
"",
"CODE",
- "DATA");
+ "DATA",
+);
/* Monitor feature name prefix mapping for monitor naming */
VIR_ENUM_IMPL(virResctrlMonitorPrefix, VIR_RESCTRL_MONITOR_TYPE_LAST,
"__unsupported__",
"llc_",
- "mbm_");
+ "mbm_",
+);
/* All private typedefs so that they exist for all later definitions. This way
diff --git a/src/util/virsecret.c b/src/util/virsecret.c
index e02076904a..b503cf5de6 100644
--- a/src/util/virsecret.c
+++ b/src/util/virsecret.c
@@ -33,7 +33,8 @@
VIR_LOG_INIT("util.secret");
VIR_ENUM_IMPL(virSecretUsage, VIR_SECRET_USAGE_TYPE_LAST,
- "none", "volume", "ceph", "iscsi",
"tls");
+ "none", "volume", "ceph", "iscsi",
"tls",
+);
void
virSecretLookupDefClear(virSecretLookupTypeDefPtr def)
diff --git a/src/util/virstorageencryption.c b/src/util/virstorageencryption.c
index f4eeacaa01..49df7fddd8 100644
--- a/src/util/virstorageencryption.c
+++ b/src/util/virstorageencryption.c
@@ -38,11 +38,14 @@
#define VIR_FROM_THIS VIR_FROM_STORAGE
VIR_ENUM_IMPL(virStorageEncryptionSecret,
- VIR_STORAGE_ENCRYPTION_SECRET_TYPE_LAST, "passphrase");
+ VIR_STORAGE_ENCRYPTION_SECRET_TYPE_LAST,
+ "passphrase",
+);
VIR_ENUM_IMPL(virStorageEncryptionFormat,
VIR_STORAGE_ENCRYPTION_FORMAT_LAST,
- "default", "qcow", "luks");
+ "default", "qcow", "luks",
+);
static void
virStorageEncryptionInfoDefFree(virStorageEncryptionInfoDefPtr def)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 065ab6dde5..2ac58c4d20 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -53,7 +53,8 @@ VIR_ENUM_IMPL(virStorage, VIR_STORAGE_TYPE_LAST,
"block",
"dir",
"network",
- "volume");
+ "volume",
+);
VIR_ENUM_IMPL(virStorageFileFormat,
VIR_STORAGE_FILE_LAST,
@@ -64,12 +65,13 @@ VIR_ENUM_IMPL(virStorageFileFormat,
/* Not direct file formats, but used for various drivers */
"fat", "vhd", "ploop",
/* Formats with backing file below here */
- "cow", "qcow", "qcow2", "qed",
"vmdk");
+ "cow", "qcow", "qcow2", "qed",
"vmdk",
+);
VIR_ENUM_IMPL(virStorageFileFeature,
VIR_STORAGE_FILE_FEATURE_LAST,
"lazy_refcounts",
- );
+);
VIR_ENUM_IMPL(virStorageNetProtocol, VIR_STORAGE_NET_PROTOCOL_LAST,
"none",
@@ -84,22 +86,26 @@ VIR_ENUM_IMPL(virStorageNetProtocol, VIR_STORAGE_NET_PROTOCOL_LAST,
"ftps",
"tftp",
"ssh",
- "vxhs");
+ "vxhs",
+);
VIR_ENUM_IMPL(virStorageNetHostTransport, VIR_STORAGE_NET_HOST_TRANS_LAST,
"tcp",
"unix",
- "rdma");
+ "rdma",
+);
VIR_ENUM_IMPL(virStorageSourcePoolMode,
VIR_STORAGE_SOURCE_POOL_MODE_LAST,
"default",
"host",
- "direct");
+ "direct",
+);
VIR_ENUM_IMPL(virStorageAuth,
VIR_STORAGE_AUTH_TYPE_LAST,
- "none", "chap", "ceph");
+ "none", "chap", "ceph",
+);
enum lv_endian {
LV_LITTLE_ENDIAN = 1, /* 1234 */
diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index 6cc1952a3a..8d24f6f0a3 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -42,7 +42,8 @@
VIR_LOG_INIT("util.sysinfo");
VIR_ENUM_IMPL(virSysinfo, VIR_SYSINFO_LAST,
- "smbios");
+ "smbios",
+);
static const char *sysinfoDmidecode = DMIDECODE;
static const char *sysinfoSysinfo = "/proc/sysinfo";
diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
index f52315300b..464f41eea5 100644
--- a/src/util/virtypedparam.c
+++ b/src/util/virtypedparam.c
@@ -39,7 +39,8 @@ VIR_ENUM_IMPL(virTypedParameter, VIR_TYPED_PARAM_LAST,
"ullong",
"double",
"boolean",
- "string");
+ "string",
+);
/* When editing this file, ensure that public exported functions
* (those in libvirt_public.syms) either trigger no errors, or else
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 2d79169cba..8dc8679bb5 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -87,12 +87,14 @@ VIR_LOG_INIT("util.util");
VIR_ENUM_IMPL(virTristateBool, VIR_TRISTATE_BOOL_LAST,
"default",
"yes",
- "no");
+ "no",
+);
VIR_ENUM_IMPL(virTristateSwitch, VIR_TRISTATE_SWITCH_LAST,
"default",
"on",
- "off");
+ "off",
+);
virTristateBool
diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c
index 89ed6394da..21559da4a4 100644
--- a/src/vmware/vmware_conf.c
+++ b/src/vmware/vmware_conf.c
@@ -41,7 +41,8 @@ VIR_LOG_INIT("vmware.vmware_conf");
VIR_ENUM_IMPL(vmwareDriver, VMWARE_DRIVER_LAST,
"player",
"ws",
- "fusion");
+ "fusion",
+);
/* Free all memory associated with a vmware_driver structure */
void
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 25f7155cba..1897a626d5 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -41,7 +41,8 @@ VIR_ENUM_IMPL(virshDomainIOError,
VIR_DOMAIN_DISK_ERROR_LAST,
N_("no error"),
N_("unspecified error"),
- N_("no space"));
+ N_("no space"),
+);
static const char *
virshDomainIOErrorToString(int error)
@@ -105,7 +106,8 @@ VIR_ENUM_IMPL(virshDomainControlState,
N_("ok"),
N_("background job"),
N_("occupied"),
- N_("error"));
+ N_("error"),
+);
static const char *
virshDomainControlStateToString(int state)
@@ -120,7 +122,8 @@ VIR_ENUM_IMPL(virshDomainControlErrorReason,
"",
N_("unknown"),
N_("monitor failure"),
- N_("internal (locking) error"));
+ N_("internal (locking) error"),
+);
static const char *
virshDomainControlErrorReasonToString(int reason)
@@ -139,7 +142,8 @@ VIR_ENUM_IMPL(virshDomainState,
N_("in shutdown"),
N_("shut off"),
N_("crashed"),
- N_("pmsuspended"));
+ N_("pmsuspended"),
+);
static const char *
virshDomainStateToString(int state)
@@ -151,7 +155,8 @@ virshDomainStateToString(int state)
VIR_ENUM_DECL(virshDomainNostateReason);
VIR_ENUM_IMPL(virshDomainNostateReason,
VIR_DOMAIN_NOSTATE_LAST,
- N_("unknown"));
+ N_("unknown"),
+);
VIR_ENUM_DECL(virshDomainRunningReason);
VIR_ENUM_IMPL(virshDomainRunningReason,
@@ -166,12 +171,14 @@ VIR_ENUM_IMPL(virshDomainRunningReason,
N_("save canceled"),
N_("event wakeup"),
N_("crashed"),
- N_("post-copy"));
+ N_("post-copy"),
+);
VIR_ENUM_DECL(virshDomainBlockedReason);
VIR_ENUM_IMPL(virshDomainBlockedReason,
VIR_DOMAIN_BLOCKED_LAST,
- N_("unknown"));
+ N_("unknown"),
+);
VIR_ENUM_DECL(virshDomainPausedReason);
VIR_ENUM_IMPL(virshDomainPausedReason,
@@ -189,13 +196,15 @@ VIR_ENUM_IMPL(virshDomainPausedReason,
N_("crashed"),
N_("starting up"),
N_("post-copy"),
- N_("post-copy failed"));
+ N_("post-copy failed"),
+);
VIR_ENUM_DECL(virshDomainShutdownReason);
VIR_ENUM_IMPL(virshDomainShutdownReason,
VIR_DOMAIN_SHUTDOWN_LAST,
N_("unknown"),
- N_("user"));
+ N_("user"),
+);
VIR_ENUM_DECL(virshDomainShutoffReason);
VIR_ENUM_IMPL(virshDomainShutoffReason,
@@ -208,18 +217,21 @@ VIR_ENUM_IMPL(virshDomainShutoffReason,
N_("saved"),
N_("failed"),
N_("from snapshot"),
- N_("daemon"));
+ N_("daemon"),
+);
VIR_ENUM_DECL(virshDomainCrashedReason);
VIR_ENUM_IMPL(virshDomainCrashedReason,
VIR_DOMAIN_CRASHED_LAST,
N_("unknown"),
- N_("panicked"));
+ N_("panicked"),
+);
VIR_ENUM_DECL(virshDomainPMSuspendedReason);
VIR_ENUM_IMPL(virshDomainPMSuspendedReason,
VIR_DOMAIN_PMSUSPENDED_LAST,
- N_("unknown"));
+ N_("unknown"),
+);
static const char *
virshDomainStateReasonToString(int state, int reason)
--
2.20.1