提交 6a4d938d 编写于 作者: C Cole Robinson

Require a semicolon for VIR_ENUM_IMPL calls

Missing semicolon at the end of macros can confuse some analyzers
(like cppcheck <filename>), and we have a mix of semicolon and
non-semicolon usage through the code. Let's standardize on using
a semicolon for VIR_ENUM_IMPL calls.

Move the verify() statement to the end of the macro and drop
the semicolon, so the compiler will require callers to add a
semicolon.

While we are touching these call sites, standardize on putting
the closing parenth on its own line, as discussed here:
https://www.redhat.com/archives/libvir-list/2019-January/msg00750.htmlReviewed-by: NJohn Ferlan <jferlan@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 7662194b
无相关合并请求
......@@ -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",
);
......@@ -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);
......
......@@ -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
......
......@@ -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;
......
此差异已折叠。
......@@ -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);
......
......@@ -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)
......
......@@ -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)
......
......@@ -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,
......
......@@ -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;
......
......@@ -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",
);
/*
......
......@@ -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
......
......@@ -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)
......
......@@ -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);
......
......@@ -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,
......
......@@ -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,
......
......@@ -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)
......
......@@ -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)
......
......@@ -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,
......
......@@ -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",
);
/**
......
......@@ -2751,14 +2751,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;
......
......@@ -50,7 +50,8 @@ VIR_ENUM_IMPL(qemuMigrationCookieFlag,
"cpu-hotplug",
"cpu",
"allowReboot",
"capabilities");
"capabilities",
);
static void
......
......@@ -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)
......
......@@ -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,
......
......@@ -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)
{
......
......@@ -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",
);
/**
......
......@@ -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 };
......
......@@ -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__
......
......@@ -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__
......
......@@ -70,7 +70,8 @@ VIR_ENUM_IMPL(virConf, VIR_CONF_LAST,
"long",
"unsigned long",
"string",
"list");
"list",
);
typedef struct _virConfEntry virConfEntry;
typedef virConfEntry *virConfEntryPtr;
......
......@@ -139,7 +139,7 @@ VIR_ENUM_IMPL(virErrorDomain, VIR_ERR_DOMAIN_LAST,
"Libssh transport layer",
"Resource control",
"FirewallD",
);
);
/*
......
......@@ -44,7 +44,8 @@ VIR_ENUM_DECL(virFirewallLayerCommand);
VIR_ENUM_IMPL(virFirewallLayerCommand, VIR_FIREWALL_LAYER_LAST,
EBTABLES_PATH,
IPTABLES_PATH,
IP6TABLES_PATH);
IP6TABLES_PATH,
);
struct _virFirewallRule {
virFirewallLayer layer;
......
......@@ -28,4 +28,4 @@ VIR_ENUM_IMPL(virGICVersion, VIR_GIC_VERSION_LAST,
"host",
"2",
"3",
);
);
......@@ -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;
......
......@@ -79,7 +79,7 @@ VIR_ENUM_IMPL(virKeycodeSet, VIR_KEYCODE_SET_LAST,
"usb",
"win32",
"qnum",
);
);
int virKeycodeValueFromString(virKeycodeSet codeset,
const char *keyname)
......
......@@ -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
......
......@@ -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;
......
......@@ -2417,7 +2417,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,
......@@ -2434,7 +2435,8 @@ VIR_ENUM_IMPL(virNetDevFeature,
"rxhash",
"rdma",
"txudptnl",
"switchdev")
"switchdev",
);
#ifdef __linux__
int
......@@ -2766,7 +2768,8 @@ VIR_ENUM_IMPL(virNetDevRxFilterMode,
VIR_NETDEV_RX_FILTER_MODE_LAST,
"none",
"normal",
"all");
"all",
);
static int virNetDevGetMulticastTable(const char *ifname,
......
......@@ -36,7 +36,8 @@ VIR_ENUM_IMPL(virNetDevMacVLanMode, VIR_NETDEV_MACVLAN_MODE_LAST,
"vepa",
"private",
"bridge",
"passthrough")
"passthrough",
);
#if WITH_MACVTAP
# include <fcntl.h>
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -112,7 +112,8 @@ VIR_ENUM_IMPL(virProcessSchedPolicy, VIR_PROC_POLICY_LAST,
"batch",
"idle",
"fifo",
"rr");
"rr",
);
/**
* virProcessTranslateStatus:
......
......@@ -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
......
......@@ -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)
......
......@@ -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)
......
......@@ -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 */
......
......@@ -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";
......
......@@ -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
......
......@@ -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
......
......@@ -82,7 +82,6 @@ const char *virEnumToString(const char *const*types,
# define VIR_ENUM_IMPL(name, lastVal, ...) \
static const char *const name ## TypeList[] = { __VA_ARGS__ }; \
verify(ARRAY_CARDINALITY(name ## TypeList) == lastVal); \
const char *name ## TypeToString(int type) { \
return virEnumToString(name ## TypeList, \
ARRAY_CARDINALITY(name ## TypeList), \
......@@ -92,7 +91,8 @@ const char *virEnumToString(const char *const*types,
return virEnumFromString(name ## TypeList, \
ARRAY_CARDINALITY(name ## TypeList), \
type); \
}
} \
verify(ARRAY_CARDINALITY(name ## TypeList) == lastVal)
# define VIR_ENUM_DECL(name) \
const char *name ## TypeToString(int type); \
......
......@@ -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
......
......@@ -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)
......
......@@ -102,7 +102,7 @@ VIR_ENUM_IMPL(virshDomainVcpuState,
VIR_VCPU_LAST,
N_("offline"),
N_("running"),
N_("blocked"))
N_("blocked"));
static const char *
virshDomainVcpuStateToString(int state)
......@@ -2561,7 +2561,7 @@ VIR_ENUM_IMPL(virshDomainBlockJob,
N_("Block Pull"),
N_("Block Copy"),
N_("Block Commit"),
N_("Active Block Commit"))
N_("Active Block Commit"));
static const char *
virshDomainBlockJobToString(int type)
......@@ -5647,7 +5647,7 @@ static const vshCmdOptDef opts_setLifecycleAction[] = {
VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST,
"poweroff",
"reboot",
"crash")
"crash");
VIR_ENUM_IMPL(virDomainLifecycleAction, VIR_DOMAIN_LIFECYCLE_ACTION_LAST,
"destroy",
......@@ -5655,7 +5655,7 @@ VIR_ENUM_IMPL(virDomainLifecycleAction, VIR_DOMAIN_LIFECYCLE_ACTION_LAST,
"rename-restart",
"preserve",
"coredump-destroy",
"coredump-restart")
"coredump-restart");
static bool
cmdSetLifecycleAction(vshControl *ctl, const vshCmd *cmd)
......@@ -6044,7 +6044,7 @@ VIR_ENUM_IMPL(virshDomainJob,
N_("Unbounded"),
N_("Completed"),
N_("Failed"),
N_("Cancelled"))
N_("Cancelled"));
static const char *
virshDomainJobToString(int type)
......@@ -6064,7 +6064,7 @@ VIR_ENUM_IMPL(virshDomainJobOperation,
N_("Outgoing migration"),
N_("Snapshot"),
N_("Snapshot revert"),
N_("Dump"))
N_("Dump"));
static const char *
virshDomainJobOperationToString(int op)
......@@ -8784,7 +8784,7 @@ VIR_ENUM_IMPL(virDomainProcessSignal,
"rt13", "rt14", "rt15", "rt16", "rt17", /* 45-49 */
"rt18", "rt19", "rt20", "rt21", "rt22", /* 50-54 */
"rt23", "rt24", "rt25", "rt26", "rt27", /* 55-59 */
"rt28", "rt29", "rt30", "rt31", "rt32") /* 60-64 */
"rt28", "rt29", "rt30", "rt31", "rt32"); /* 60-64 */
static int getSignalNumber(vshControl *ctl, const char *signame)
{
......@@ -12694,7 +12694,7 @@ VIR_ENUM_IMPL(virshDomainEvent,
N_("Stopped"),
N_("Shutdown"),
N_("PMSuspended"),
N_("Crashed"))
N_("Crashed"));
static const char *
virshDomainEventToString(int event)
......@@ -12709,13 +12709,13 @@ VIR_ENUM_IMPL(virshDomainEventDefined,
N_("Added"),
N_("Updated"),
N_("Renamed"),
N_("Snapshot"))
N_("Snapshot"));
VIR_ENUM_DECL(virshDomainEventUndefined);
VIR_ENUM_IMPL(virshDomainEventUndefined,
VIR_DOMAIN_EVENT_UNDEFINED_LAST,
N_("Removed"),
N_("Renamed"))
N_("Renamed"));
VIR_ENUM_DECL(virshDomainEventStarted);
VIR_ENUM_IMPL(virshDomainEventStarted,
......@@ -12724,7 +12724,7 @@ VIR_ENUM_IMPL(virshDomainEventStarted,
N_("Migrated"),
N_("Restored"),
N_("Snapshot"),
N_("Event wakeup"))
N_("Event wakeup"));
VIR_ENUM_DECL(virshDomainEventSuspended);
VIR_ENUM_IMPL(virshDomainEventSuspended,
......@@ -12737,7 +12737,7 @@ VIR_ENUM_IMPL(virshDomainEventSuspended,
N_("Snapshot"),
N_("API error"),
N_("Post-copy"),
N_("Post-copy Error"))
N_("Post-copy Error"));
VIR_ENUM_DECL(virshDomainEventResumed);
VIR_ENUM_IMPL(virshDomainEventResumed,
......@@ -12745,7 +12745,7 @@ VIR_ENUM_IMPL(virshDomainEventResumed,
N_("Unpaused"),
N_("Migrated"),
N_("Snapshot"),
N_("Post-copy"))
N_("Post-copy"));
VIR_ENUM_DECL(virshDomainEventStopped);
VIR_ENUM_IMPL(virshDomainEventStopped,
......@@ -12756,25 +12756,25 @@ VIR_ENUM_IMPL(virshDomainEventStopped,
N_("Migrated"),
N_("Saved"),
N_("Failed"),
N_("Snapshot"))
N_("Snapshot"));
VIR_ENUM_DECL(virshDomainEventShutdown);
VIR_ENUM_IMPL(virshDomainEventShutdown,
VIR_DOMAIN_EVENT_SHUTDOWN_LAST,
N_("Finished"),
N_("Finished after guest request"),
N_("Finished after host request"))
N_("Finished after host request"));
VIR_ENUM_DECL(virshDomainEventPMSuspended);
VIR_ENUM_IMPL(virshDomainEventPMSuspended,
VIR_DOMAIN_EVENT_PMSUSPENDED_LAST,
N_("Memory"),
N_("Disk"))
N_("Disk"));
VIR_ENUM_DECL(virshDomainEventCrashed);
VIR_ENUM_IMPL(virshDomainEventCrashed,
VIR_DOMAIN_EVENT_CRASHED_LAST,
N_("Panicked"))
N_("Panicked"));
static const char *
virshDomainEventDetailToString(int event, int detail)
......@@ -12823,7 +12823,7 @@ VIR_ENUM_IMPL(virshDomainEventWatchdog,
N_("poweroff"),
N_("shutdown"),
N_("debug"),
N_("inject-nmi"))
N_("inject-nmi"));
static const char *
virshDomainEventWatchdogToString(int action)
......@@ -12837,7 +12837,7 @@ VIR_ENUM_IMPL(virshDomainEventIOError,
VIR_DOMAIN_EVENT_IO_ERROR_LAST,
N_("none"),
N_("pause"),
N_("report"))
N_("report"));
static const char *
virshDomainEventIOErrorToString(int action)
......@@ -12851,7 +12851,7 @@ VIR_ENUM_IMPL(virshGraphicsPhase,
VIR_DOMAIN_EVENT_GRAPHICS_LAST,
N_("connect"),
N_("initialize"),
N_("disconnect"))
N_("disconnect"));
static const char *
virshGraphicsPhaseToString(int phase)
......@@ -12865,7 +12865,7 @@ VIR_ENUM_IMPL(virshGraphicsAddress,
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST,
N_("IPv4"),
N_("IPv6"),
N_("unix"))
N_("unix"));
static const char *
virshGraphicsAddressToString(int family)
......@@ -12880,7 +12880,7 @@ VIR_ENUM_IMPL(virshDomainBlockJobStatus,
N_("completed"),
N_("failed"),
N_("canceled"),
N_("ready"))
N_("ready"));
static const char *
virshDomainBlockJobStatusToString(int status)
......@@ -12893,7 +12893,7 @@ VIR_ENUM_DECL(virshDomainEventDiskChange);
VIR_ENUM_IMPL(virshDomainEventDiskChange,
VIR_DOMAIN_EVENT_DISK_CHANGE_LAST,
N_("changed"),
N_("dropped"))
N_("dropped"));
static const char *
virshDomainEventDiskChangeToString(int reason)
......@@ -12906,7 +12906,7 @@ VIR_ENUM_DECL(virshDomainEventTrayChange);
VIR_ENUM_IMPL(virshDomainEventTrayChange,
VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST,
N_("opened"),
N_("closed"))
N_("closed"));
static const char *
virshDomainEventTrayChangeToString(int reason)
......@@ -13231,14 +13231,14 @@ VIR_ENUM_IMPL(virshEventAgentLifecycleState,
VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_LAST,
N_("unknown"),
N_("connected"),
N_("disconnected"))
N_("disconnected"));
VIR_ENUM_DECL(virshEventAgentLifecycleReason);
VIR_ENUM_IMPL(virshEventAgentLifecycleReason,
VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_LAST,
N_("unknown"),
N_("domain started"),
N_("channel event"))
N_("channel event"));
#define UNKNOWNSTR(str) (str ? str : N_("unsupported value"))
static void
......@@ -13317,7 +13317,7 @@ VIR_ENUM_IMPL(virshEventMetadataChangeType,
VIR_DOMAIN_METADATA_LAST,
N_("description"),
N_("title"),
N_("element"))
N_("element"));
static void
virshEventMetadataChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
......
......@@ -1142,7 +1142,7 @@ VIR_ENUM_IMPL(virshNetworkEvent,
N_("Defined"),
N_("Undefined"),
N_("Started"),
N_("Stopped"))
N_("Stopped"));
static const char *
virshNetworkEventToString(int event)
......@@ -1162,7 +1162,7 @@ typedef struct virshNetEventData virshNetEventData;
VIR_ENUM_DECL(virshNetworkEventId);
VIR_ENUM_IMPL(virshNetworkEventId,
VIR_NETWORK_EVENT_ID_LAST,
"lifecycle")
"lifecycle");
static void
vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
......
......@@ -759,7 +759,7 @@ VIR_ENUM_DECL(virshNodeDeviceEvent);
VIR_ENUM_IMPL(virshNodeDeviceEvent,
VIR_NODE_DEVICE_EVENT_LAST,
N_("Created"),
N_("Deleted"))
N_("Deleted"));
static const char *
virshNodeDeviceEventToString(int event)
......
......@@ -1044,7 +1044,7 @@ VIR_ENUM_IMPL(virshStoragePoolState,
N_("building"),
N_("running"),
N_("degraded"),
N_("inaccessible"))
N_("inaccessible"));
static const char *
virshStoragePoolStateToString(int state)
......@@ -1896,7 +1896,7 @@ VIR_ENUM_IMPL(virshPoolEvent,
N_("Started"),
N_("Stopped"),
N_("Created"),
N_("Deleted"))
N_("Deleted"));
static const char *
virshPoolEventToString(int event)
......
......@@ -569,7 +569,7 @@ VIR_ENUM_DECL(virshSecretEvent);
VIR_ENUM_IMPL(virshSecretEvent,
VIR_SECRET_EVENT_LAST,
N_("Defined"),
N_("Undefined"))
N_("Undefined"));
static const char *
virshSecretEventToString(int event)
......
......@@ -989,7 +989,7 @@ VIR_ENUM_IMPL(virshStorageVol,
N_("dir"),
N_("network"),
N_("netdir"),
N_("ploop"))
N_("ploop"));
static const char *
virshVolumeTypeToString(int type)
......
......@@ -59,7 +59,7 @@ VIR_ENUM_IMPL(virClientTransport,
VIR_CLIENT_TRANS_LAST,
N_("unix"),
N_("tcp"),
N_("tls"))
N_("tls"));
static const char *
vshAdmClientTransportToString(int transport)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部