[libvirt] [PATCH v6 0/8] Incremental backups: virDomainSnapshot class
This is a respin of patch 4/20 in my larger series: https://www.redhat.com/archives/libvir-list/2019-March/msg00386.html As John pointed out, my v4/v5 posting had a LOT of duplicate code, including lots of poorly commented code managing a potential tree of checkpoints (even if the more immediate use tends to be a linear chain than a full-blown tree), all because I had copied-and-pasted from snapshot code. Copy-and-paste is technical debt; better is to get rid of the debt by refactoring the code for easy reuse. Here's as far as I got today, but hopefully reviewers agree that this glimpse of where things are headed is worthwhile, and I can start pushing these patches while continuing my cleanup work on the rest of the incremental backup stuff. Pre-series, virDomainSnapshotList() code in snapshot_conf.h can only compute a list of virDomainSnapshotPtrs; once this series is applied, that function will instead be changed to compute a list of virDomainMomentPtrs (which is then trivially cast to virDomainSnapshotPtr or virDomainCheckpointPtr as needed), so that all the code related to maintaining relationships between points in time can be shared rather than duplicated between snapshots and checkpoints. Eric Blake (8): snapshot: Split domain forward typedefs into new file snapshot: Sort virconftypes.h snapshot: Break out virDomainSnapshotObj into its own file snapshot: Export two functions prior to file split snapshot: Break out virDomainSnapshotObjList into its own file snapshot: Use accessors for virDomainSnapshot members snapshot: Create virDomainMoment base class backup: Introduce virDomainCheckpointPtr include/libvirt/virterror.h | 6 +- src/util/virerror.c | 12 +- include/libvirt/libvirt.h | 6 +- src/conf/domain_conf.h | 220 +--------- src/conf/snapshot_conf.h | 74 +--- src/conf/virconftypes.h | 281 +++++++++++++ src/conf/virdomainsnapshotobj.h | 50 +++ src/conf/virdomainsnapshotobjlist.h | 74 ++++ src/datatypes.h | 79 +++- src/conf/Makefile.inc.am | 5 + src/conf/domain_conf.c | 1 + src/conf/snapshot_conf.c | 608 +--------------------------- src/conf/virdomainobjlist.c | 1 + src/conf/virdomainsnapshotobj.c | 123 ++++++ src/conf/virdomainsnapshotobjlist.c | 553 +++++++++++++++++++++++++ src/datatypes.c | 132 ++++-- src/esx/esx_driver.c | 66 +-- src/libvirt-domain-snapshot.c | 26 +- src/libvirt_private.syms | 38 +- src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c | 1 + src/qemu/qemu_driver.c | 41 +- src/qemu/qemu_migration.c | 1 + src/remote/remote_daemon_dispatch.c | 4 +- src/remote/remote_driver.c | 4 +- src/rpc/gendispatch.pl | 2 +- src/test/test_driver.c | 21 +- src/vbox/vbox_common.c | 56 +-- src/vz/vz_driver.c | 52 +-- 29 files changed, 1450 insertions(+), 1088 deletions(-) create mode 100644 src/conf/virconftypes.h create mode 100644 src/conf/virdomainsnapshotobj.h create mode 100644 src/conf/virdomainsnapshotobjlist.h create mode 100644 src/conf/virdomainsnapshotobj.c create mode 100644 src/conf/virdomainsnapshotobjlist.c -- 2.20.1
Right now, snapshot_conf.h is rather large - it deals with three separate types: virDomainSnapshotDef (the snapshot definition as it maps to XML), virDomainSnapshotObj (an object containing a def and the relationship to other snapshots), and virDomainSnapshotObjList (a list of snapshot objects), where two of the three types are currently public rather than opaque. What's more, the types are circular: a snapshot def includes a virDomainPtr, which contains a snapshot list, which includes a snapshot object, which includes a snapshot def. In order to split the three objects into separate files, while still allowing each header to use sane typedefs to incomplete pointers, the obvious solution is to lift the typedefs into yet another header, with no other dependencies. Start the split by factoring out all struct typedefs from domain_conf.h (enum typedefs don't get used in function signatures, and function typedefs tend not to suffer from circular referencing, so those stay put). The only other excpetion is virDomainStateReason, which is only ever used directly rather than via a pointer. This patch is just straight code motion (all typedefs are listed in the same order before and after the patch). Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/domain_conf.h | 220 +------------------------------ src/conf/virconftypes.h | 278 +++++++++++++++++++++++++++++++++++++++ src/conf/Makefile.inc.am | 1 + 3 files changed, 281 insertions(+), 218 deletions(-) create mode 100644 src/conf/virconftypes.h diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 50d2173654..538fb50b9e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1,7 +1,7 @@ /* * domain_conf.h: domain XML processing * - * Copyright (C) 2006-2016 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * Copyright (C) 2006-2008 Daniel P. Berrange * Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. * @@ -28,6 +28,7 @@ # include <libxml/xpath.h> # include "internal.h" +# include "virconftypes.h" # include "capabilities.h" # include "virstorageencryption.h" # include "cpu_conf.h" @@ -56,111 +57,6 @@ # include "virsavecookie.h" # include "virresctrl.h" -/* forward declarations of all device types, required by - * virDomainDeviceDef - */ -typedef struct _virDomainDiskDef virDomainDiskDef; -typedef virDomainDiskDef *virDomainDiskDefPtr; - -typedef struct _virDomainControllerDef virDomainControllerDef; -typedef virDomainControllerDef *virDomainControllerDefPtr; - -typedef struct _virDomainLeaseDef virDomainLeaseDef; -typedef virDomainLeaseDef *virDomainLeaseDefPtr; - -typedef struct _virDomainFSDef virDomainFSDef; -typedef virDomainFSDef *virDomainFSDefPtr; - -typedef struct _virDomainNetDef virDomainNetDef; -typedef virDomainNetDef *virDomainNetDefPtr; - -typedef struct _virDomainInputDef virDomainInputDef; -typedef virDomainInputDef *virDomainInputDefPtr; - -typedef struct _virDomainSoundCodecDef virDomainSoundCodecDef; -typedef virDomainSoundCodecDef *virDomainSoundCodecDefPtr; - -typedef struct _virDomainSoundDef virDomainSoundDef; -typedef virDomainSoundDef *virDomainSoundDefPtr; - -typedef struct _virDomainVideoDef virDomainVideoDef; -typedef virDomainVideoDef *virDomainVideoDefPtr; - -typedef struct _virDomainHostdevDef virDomainHostdevDef; -typedef virDomainHostdevDef *virDomainHostdevDefPtr; - -typedef struct _virDomainWatchdogDef virDomainWatchdogDef; -typedef virDomainWatchdogDef *virDomainWatchdogDefPtr; - -typedef struct _virDomainGraphicsDef virDomainGraphicsDef; -typedef virDomainGraphicsDef *virDomainGraphicsDefPtr; - -typedef struct _virDomainHubDef virDomainHubDef; -typedef virDomainHubDef *virDomainHubDefPtr; - -typedef struct _virDomainRedirdevDef virDomainRedirdevDef; -typedef virDomainRedirdevDef *virDomainRedirdevDefPtr; - -typedef struct _virDomainRedirFilterUSBDevDef virDomainRedirFilterUSBDevDef; -typedef virDomainRedirFilterUSBDevDef *virDomainRedirFilterUSBDevDefPtr; - -typedef struct _virDomainRedirFilterDef virDomainRedirFilterDef; -typedef virDomainRedirFilterDef *virDomainRedirFilterDefPtr; - -typedef struct _virDomainSmartcardDef virDomainSmartcardDef; -typedef virDomainSmartcardDef *virDomainSmartcardDefPtr; - -typedef struct _virDomainChrDef virDomainChrDef; -typedef virDomainChrDef *virDomainChrDefPtr; - -typedef struct _virDomainMemballoonDef virDomainMemballoonDef; -typedef virDomainMemballoonDef *virDomainMemballoonDefPtr; - -typedef struct _virDomainNVRAMDef virDomainNVRAMDef; -typedef virDomainNVRAMDef *virDomainNVRAMDefPtr; - -typedef struct _virDomainSnapshotObj virDomainSnapshotObj; -typedef virDomainSnapshotObj *virDomainSnapshotObjPtr; - -typedef struct _virDomainSnapshotObjList virDomainSnapshotObjList; -typedef virDomainSnapshotObjList *virDomainSnapshotObjListPtr; - -typedef struct _virDomainRNGDef virDomainRNGDef; -typedef virDomainRNGDef *virDomainRNGDefPtr; - -typedef struct _virDomainIdMapEntry virDomainIdMapEntry; -typedef virDomainIdMapEntry *virDomainIdMapEntryPtr; - -typedef struct _virDomainIdMapDef virDomainIdMapDef; -typedef virDomainIdMapDef *virDomainIdMapDefPtr; - -typedef struct _virDomainPanicDef virDomainPanicDef; -typedef virDomainPanicDef *virDomainPanicDefPtr; - -typedef struct _virDomainMemoryDef virDomainMemoryDef; -typedef virDomainMemoryDef *virDomainMemoryDefPtr; - -/* forward declarations virDomainChrSourceDef, required by - * virDomainNetDef - */ -typedef struct _virDomainChrSourceDef virDomainChrSourceDef; -typedef virDomainChrSourceDef *virDomainChrSourceDefPtr; - -typedef struct _virDomainShmemDef virDomainShmemDef; -typedef virDomainShmemDef *virDomainShmemDefPtr; - -typedef struct _virDomainTPMDef virDomainTPMDef; -typedef virDomainTPMDef *virDomainTPMDefPtr; - -typedef struct _virDomainIOMMUDef virDomainIOMMUDef; -typedef virDomainIOMMUDef *virDomainIOMMUDefPtr; - -typedef struct _virDomainVsockDef virDomainVsockDef; -typedef virDomainVsockDef *virDomainVsockDefPtr; - -typedef struct _virDomainVirtioOptions virDomainVirtioOptions; -typedef virDomainVirtioOptions *virDomainVirtioOptionsPtr; - /* Flags for the 'type' field in virDomainDeviceDef */ typedef enum { VIR_DOMAIN_DEVICE_NONE = 0, @@ -192,8 +88,6 @@ typedef enum { VIR_DOMAIN_DEVICE_LAST } virDomainDeviceType; -typedef struct _virDomainDeviceDef virDomainDeviceDef; -typedef virDomainDeviceDef *virDomainDeviceDefPtr; struct _virDomainDeviceDef { int type; /* enum virDomainDeviceType */ union { @@ -260,8 +154,6 @@ typedef enum { VIR_ENUM_DECL(virDomainOS); -typedef struct _virDomainHostdevOrigStates virDomainHostdevOrigStates; -typedef virDomainHostdevOrigStates *virDomainHostdevOrigStatesPtr; struct _virDomainHostdevOrigStates { union { struct { @@ -331,8 +223,6 @@ typedef enum { VIR_ENUM_DECL(virDomainHostdevSubsysSCSIProtocol); -typedef struct _virDomainHostdevSubsysUSB virDomainHostdevSubsysUSB; -typedef virDomainHostdevSubsysUSB *virDomainHostdevSubsysUSBPtr; struct _virDomainHostdevSubsysUSB { bool autoAddress; /* bus/device were filled automatically based on vendor/product */ @@ -343,15 +233,11 @@ struct _virDomainHostdevSubsysUSB { unsigned product; }; -typedef struct _virDomainHostdevSubsysPCI virDomainHostdevSubsysPCI; -typedef virDomainHostdevSubsysPCI *virDomainHostdevSubsysPCIPtr; struct _virDomainHostdevSubsysPCI { virPCIDeviceAddress addr; /* host address */ int backend; /* enum virDomainHostdevSubsysPCIBackendType */ }; -typedef struct _virDomainHostdevSubsysSCSIHost virDomainHostdevSubsysSCSIHost; -typedef virDomainHostdevSubsysSCSIHost *virDomainHostdevSubsysSCSIHostPtr; struct _virDomainHostdevSubsysSCSIHost { char *adapter; unsigned bus; @@ -359,14 +245,10 @@ struct _virDomainHostdevSubsysSCSIHost { unsigned long long unit; }; -typedef struct _virDomainHostdevSubsysSCSIiSCSI virDomainHostdevSubsysSCSIiSCSI; -typedef virDomainHostdevSubsysSCSIiSCSI *virDomainHostdevSubsysSCSIiSCSIPtr; struct _virDomainHostdevSubsysSCSIiSCSI { virStorageSourcePtr src; }; -typedef struct _virDomainHostdevSubsysSCSI virDomainHostdevSubsysSCSI; -typedef virDomainHostdevSubsysSCSI *virDomainHostdevSubsysSCSIPtr; struct _virDomainHostdevSubsysSCSI { int protocol; /* enum virDomainHostdevSCSIProtocolType */ int sgio; /* enum virDomainDeviceSGIO */ @@ -377,8 +259,6 @@ struct _virDomainHostdevSubsysSCSI { } u; }; -typedef struct _virDomainHostdevSubsysMediatedDev virDomainHostdevSubsysMediatedDev; -typedef virDomainHostdevSubsysMediatedDev *virDomainHostdevSubsysMediatedDevPtr; struct _virDomainHostdevSubsysMediatedDev { int model; /* enum virMediatedDeviceModelType */ int display; /* virTristateSwitch */ @@ -405,16 +285,12 @@ typedef enum { VIR_ENUM_DECL(virDomainHostdevSubsysSCSIVHostModel); -typedef struct _virDomainHostdevSubsysSCSIVHost virDomainHostdevSubsysSCSIVHost; -typedef virDomainHostdevSubsysSCSIVHost *virDomainHostdevSubsysSCSIVHostPtr; struct _virDomainHostdevSubsysSCSIVHost { int protocol; /* enum virDomainHostdevSubsysSCSIHostProtocolType */ char *wwpn; int model; /* enum virDomainHostdevSubsysSCSIVHostModelType */ }; -typedef struct _virDomainHostdevSubsys virDomainHostdevSubsys; -typedef virDomainHostdevSubsys *virDomainHostdevSubsysPtr; struct _virDomainHostdevSubsys { int type; /* enum virDomainHostdevSubsysType */ union { @@ -435,8 +311,6 @@ typedef enum { VIR_DOMAIN_HOSTDEV_CAPS_TYPE_LAST } virDomainHostdevCapsType; -typedef struct _virDomainHostdevCaps virDomainHostdevCaps; -typedef virDomainHostdevCaps *virDomainHostdevCapsPtr; struct _virDomainHostdevCaps { int type; /* enum virDOmainHostdevCapsType */ union { @@ -588,7 +462,6 @@ typedef enum { VIR_DOMAIN_DISK_MODEL_LAST } virDomainDiskModel; -typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo; struct _virDomainBlockIoTuneInfo { unsigned long long total_bytes_sec; unsigned long long read_bytes_sec; @@ -611,7 +484,6 @@ struct _virDomainBlockIoTuneInfo { unsigned long long read_iops_sec_max_length; unsigned long long write_iops_sec_max_length; }; -typedef virDomainBlockIoTuneInfo *virDomainBlockIoTuneInfoPtr; typedef enum { @@ -808,15 +680,11 @@ typedef enum { (ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI2 || \ (ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI3)) -typedef struct _virDomainVirtioSerialOpts virDomainVirtioSerialOpts; -typedef virDomainVirtioSerialOpts *virDomainVirtioSerialOptsPtr; struct _virDomainVirtioSerialOpts { int ports; /* -1 == undef */ int vectors; /* -1 == undef */ }; -typedef struct _virDomainPCIControllerOpts virDomainPCIControllerOpts; -typedef virDomainPCIControllerOpts *virDomainPCIControllerOptsPtr; struct _virDomainPCIControllerOpts { bool pcihole64; unsigned long pcihole64size; @@ -847,14 +715,10 @@ struct _virDomainPCIControllerOpts { int numaNode; }; -typedef struct _virDomainUSBControllerOpts virDomainUSBControllerOpts; -typedef virDomainUSBControllerOpts *virDomainUSBControllerOptsPtr; struct _virDomainUSBControllerOpts { int ports; /* -1 == undef */ }; -typedef struct _virDomainXenbusControllerOpts virDomainXenbusControllerOpts; -typedef virDomainXenbusControllerOpts *virDomainXenbusControllerOptsPtr; struct _virDomainXenbusControllerOpts { int maxGrantFrames; /* -1 == undef */ }; @@ -1000,8 +864,6 @@ typedef enum { * libvirt, but still must maintain backward compatibility, because * different versions of libvirt may read the same data file. */ -typedef struct _virDomainActualNetDef virDomainActualNetDef; -typedef virDomainActualNetDef *virDomainActualNetDefPtr; struct _virDomainActualNetDef { int type; /* enum virDomainNetType */ union { @@ -1231,8 +1093,6 @@ struct _virDomainChrSourceReconnectDef { virTristateBool enabled; unsigned int timeout; }; -typedef struct _virDomainChrSourceReconnectDef virDomainChrSourceReconnectDef; -typedef virDomainChrSourceReconnectDef *virDomainChrSourceReconnectDefPtr; /* The host side information for a character device. */ @@ -1502,16 +1362,12 @@ typedef enum { VIR_ENUM_DECL(virDomainVideoVGAConf); -typedef struct _virDomainVideoAccelDef virDomainVideoAccelDef; -typedef virDomainVideoAccelDef *virDomainVideoAccelDefPtr; struct _virDomainVideoAccelDef { int accel2d; /* enum virTristateBool */ int accel3d; /* enum virTristateBool */ }; -typedef struct _virDomainVideoDriverDef virDomainVideoDriverDef; -typedef virDomainVideoDriverDef *virDomainVideoDriverDefPtr; struct _virDomainVideoDriverDef { virDomainVideoVGAConf vgaconf; }; @@ -1560,8 +1416,6 @@ typedef enum { VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_LAST } virDomainGraphicsAuthConnectedType; -typedef struct _virDomainGraphicsAuthDef virDomainGraphicsAuthDef; -typedef virDomainGraphicsAuthDef *virDomainGraphicsAuthDefPtr; struct _virDomainGraphicsAuthDef { char *passwd; bool expires; /* Whether there is an expiry time set */ @@ -1652,8 +1506,6 @@ typedef enum { VIR_DOMAIN_HUB_TYPE_LAST } virDomainHubType; -typedef struct _virDomainGraphicsListenDef virDomainGraphicsListenDef; -typedef virDomainGraphicsListenDef *virDomainGraphicsListenDefPtr; struct _virDomainGraphicsListenDef { virDomainGraphicsListenType type; char *address; @@ -1952,8 +1804,6 @@ typedef enum { VIR_ENUM_DECL(virDomainLockFailure); -typedef struct _virDomainBIOSDef virDomainBIOSDef; -typedef virDomainBIOSDef *virDomainBIOSDefPtr; struct _virDomainBIOSDef { int useserial; /* enum virTristateBool */ /* reboot-timeout parameters */ @@ -1971,8 +1821,6 @@ typedef enum { VIR_ENUM_DECL(virDomainLoader); -typedef struct _virDomainLoaderDef virDomainLoaderDef; -typedef virDomainLoaderDef *virDomainLoaderDefPtr; struct _virDomainLoaderDef { char *path; int readonly; /* enum virTristateBool */ @@ -2006,8 +1854,6 @@ typedef enum { VIR_ENUM_DECL(virDomainHPTResizing); /* Operating system configuration data & machine / arch */ -typedef struct _virDomainOSEnv virDomainOSEnv; -typedef virDomainOSEnv *virDomainOSEnvPtr; struct _virDomainOSEnv { char *name; char *value; @@ -2023,8 +1869,6 @@ typedef enum { VIR_ENUM_DECL(virDomainOsDefFirmware); -typedef struct _virDomainOSDef virDomainOSDef; -typedef virDomainOSDef *virDomainOSDefPtr; struct _virDomainOSDef { int type; virDomainOsDefFirmware firmware; @@ -2101,23 +1945,17 @@ typedef enum { VIR_DOMAIN_CPU_PLACEMENT_MODE_LAST } virDomainCpuPlacementMode; -typedef struct _virDomainThreadSchedParam virDomainThreadSchedParam; -typedef virDomainThreadSchedParam *virDomainThreadSchedParamPtr; struct _virDomainThreadSchedParam { virProcessSchedPolicy policy; int priority; }; -typedef struct _virDomainTimerCatchupDef virDomainTimerCatchupDef; -typedef virDomainTimerCatchupDef *virDomainTimerCatchupDefPtr; struct _virDomainTimerCatchupDef { unsigned long threshold; unsigned long slew; unsigned long limit; }; -typedef struct _virDomainTimerDef virDomainTimerDef; -typedef virDomainTimerDef *virDomainTimerDefPtr; struct _virDomainTimerDef { int name; int present; /* unspecified = -1, no = 0, yes = 1 */ @@ -2149,8 +1987,6 @@ typedef enum { VIR_DOMAIN_CLOCK_BASIS_LAST } virDomainClockBasis; -typedef struct _virDomainClockDef virDomainClockDef; -typedef virDomainClockDef *virDomainClockDefPtr; struct _virDomainClockDef { int offset; @@ -2181,8 +2017,6 @@ struct _virDomainClockDef { }; -typedef struct _virBlkioDevice virBlkioDevice; -typedef virBlkioDevice *virBlkioDevicePtr; struct _virBlkioDevice { char *path; unsigned int weight; @@ -2289,15 +2123,10 @@ struct _virDomainPanicDef { void virBlkioDeviceArrayClear(virBlkioDevicePtr deviceWeights, int ndevices); -typedef struct _virDomainResourceDef virDomainResourceDef; -typedef virDomainResourceDef *virDomainResourceDefPtr; struct _virDomainResourceDef { char *partition; }; -typedef struct _virDomainHugePage virDomainHugePage; -typedef virDomainHugePage *virDomainHugePagePtr; - struct _virDomainHugePage { virBitmapPtr nodemask; /* guest's NUMA node mask */ unsigned long long size; /* hugepage size in KiB */ @@ -2305,9 +2134,6 @@ struct _virDomainHugePage { # define VIR_DOMAIN_CPUMASK_LEN 1024 -typedef struct _virDomainIOThreadIDDef virDomainIOThreadIDDef; -typedef virDomainIOThreadIDDef *virDomainIOThreadIDDefPtr; - struct _virDomainIOThreadIDDef { bool autofill; unsigned int iothread_id; @@ -2320,9 +2146,6 @@ struct _virDomainIOThreadIDDef { void virDomainIOThreadIDDefFree(virDomainIOThreadIDDefPtr def); -typedef struct _virDomainCputune virDomainCputune; -typedef virDomainCputune *virDomainCputunePtr; - struct _virDomainCputune { unsigned long long shares; bool sharesSpecified; @@ -2338,17 +2161,12 @@ struct _virDomainCputune { }; -typedef struct _virDomainResctrlMonDef virDomainResctrlMonDef; -typedef virDomainResctrlMonDef *virDomainResctrlMonDefPtr; struct _virDomainResctrlMonDef { virBitmapPtr vcpus; virResctrlMonitorType tag; virResctrlMonitorPtr instance; }; -typedef struct _virDomainResctrlDef virDomainResctrlDef; -typedef virDomainResctrlDef *virDomainResctrlDefPtr; - struct _virDomainResctrlDef { virBitmapPtr vcpus; virResctrlAllocPtr alloc; @@ -2358,9 +2176,6 @@ struct _virDomainResctrlDef { }; -typedef struct _virDomainVcpuDef virDomainVcpuDef; -typedef virDomainVcpuDef *virDomainVcpuDefPtr; - struct _virDomainVcpuDef { bool online; virTristateBool hotpluggable; @@ -2373,9 +2188,6 @@ struct _virDomainVcpuDef { virObjectPtr privateData; }; -typedef struct _virDomainBlkiotune virDomainBlkiotune; -typedef virDomainBlkiotune *virDomainBlkiotunePtr; - struct _virDomainBlkiotune { unsigned int weight; @@ -2383,9 +2195,6 @@ struct _virDomainBlkiotune { virBlkioDevicePtr devices; }; -typedef struct _virDomainMemtune virDomainMemtune; -typedef virDomainMemtune *virDomainMemtunePtr; - struct _virDomainMemtune { /* total memory size including memory modules in kibibytes, this field * should be accessed only via accessors */ @@ -2415,24 +2224,17 @@ struct _virDomainMemtune { virTristateBool discard; }; -typedef struct _virDomainPowerManagement virDomainPowerManagement; -typedef virDomainPowerManagement *virDomainPowerManagementPtr; - struct _virDomainPowerManagement { /* These options are of type enum virTristateBool */ int s3; int s4; }; -typedef struct _virDomainPerfDef virDomainPerfDef; -typedef virDomainPerfDef *virDomainPerfDefPtr; struct _virDomainPerfDef { /* These options are of type enum virTristateBool */ int events[VIR_PERF_EVENT_LAST]; }; -typedef struct _virDomainKeyWrapDef virDomainKeyWrapDef; -typedef virDomainKeyWrapDef *virDomainKeyWrapDefPtr; struct _virDomainKeyWrapDef { int aes; /* enum virTristateSwitch */ int dea; /* enum virTristateSwitch */ @@ -2445,8 +2247,6 @@ typedef enum { VIR_DOMAIN_LAUNCH_SECURITY_LAST, } virDomainLaunchSecurity; -typedef struct _virDomainSEVDef virDomainSEVDef; -typedef virDomainSEVDef *virDomainSEVDefPtr; struct _virDomainSEVDef { int sectype; /* enum virDomainLaunchSecurity */ @@ -2502,8 +2302,6 @@ struct _virDomainVirtioOptions { * NB: if adding to this struct, virDomainDefCheckABIStability * may well need an update */ -typedef struct _virDomainDef virDomainDef; -typedef virDomainDef *virDomainDefPtr; struct _virDomainDef { int virtType; /* enum virDomainVirtType */ int id; @@ -2703,8 +2501,6 @@ struct _virDomainStateReason { int reason; }; -typedef struct _virDomainObj virDomainObj; -typedef virDomainObj *virDomainObjPtr; struct _virDomainObj { virObjectLockable parent; virCond cond; @@ -2752,12 +2548,6 @@ typedef enum { } virDomainDefFeatures; -/* This structure holds various callbacks and data needed - * while parsing and creating domain XMLs */ -typedef struct _virDomainXMLOption virDomainXMLOption; -typedef virDomainXMLOption *virDomainXMLOptionPtr; - - /* Called after everything else has been parsed, for adjusting basics. * This has similar semantics to virDomainDefPostParseCallback, but no * parseOpaque is used. This callback is run prior to @@ -2821,8 +2611,6 @@ typedef int (*virDomainDeviceDefValidateCallback)(const virDomainDeviceDef *dev, const virDomainDef *def, void *opaque); -typedef struct _virDomainDefParserConfig virDomainDefParserConfig; -typedef virDomainDefParserConfig *virDomainDefParserConfigPtr; struct _virDomainDefParserConfig { /* driver domain definition callbacks */ virDomainDefPostParseBasicCallback domainPostParseBasicCallback; @@ -2867,8 +2655,6 @@ typedef int (*virDomainXMLPrivateDataStorageSourceFormatFunc)(virStorageSourcePt virBufferPtr buf); -typedef struct _virDomainXMLPrivateDataCallbacks virDomainXMLPrivateDataCallbacks; -typedef virDomainXMLPrivateDataCallbacks *virDomainXMLPrivateDataCallbacksPtr; struct _virDomainXMLPrivateDataCallbacks { virDomainXMLPrivateDataAllocFunc alloc; virDomainXMLPrivateDataFreeFunc free; @@ -2893,8 +2679,6 @@ struct _virDomainXMLPrivateDataCallbacks { typedef bool (*virDomainABIStabilityDomain)(const virDomainDef *src, const virDomainDef *dst); -typedef struct _virDomainABIStability virDomainABIStability; -typedef virDomainABIStability *virDomainABIStabilityPtr; struct _virDomainABIStability { virDomainABIStabilityDomain domain; }; diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h new file mode 100644 index 0000000000..0e0dc3da03 --- /dev/null +++ b/src/conf/virconftypes.h @@ -0,0 +1,278 @@ +/* + * virconftypes.h: struct typedefs to avoid circular inclusion + * (derived from domain_conf.h) + * + * Copyright (C) 2006-2019 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#ifndef LIBVIRT_VIRCONFTYPES_H +# define LIBVIRT_VIRCONFTYPES_H + +/* forward declarations of various types required in src/conf */ + +typedef struct _virDomainDiskDef virDomainDiskDef; +typedef virDomainDiskDef *virDomainDiskDefPtr; + +typedef struct _virDomainControllerDef virDomainControllerDef; +typedef virDomainControllerDef *virDomainControllerDefPtr; + +typedef struct _virDomainLeaseDef virDomainLeaseDef; +typedef virDomainLeaseDef *virDomainLeaseDefPtr; + +typedef struct _virDomainFSDef virDomainFSDef; +typedef virDomainFSDef *virDomainFSDefPtr; + +typedef struct _virDomainNetDef virDomainNetDef; +typedef virDomainNetDef *virDomainNetDefPtr; + +typedef struct _virDomainInputDef virDomainInputDef; +typedef virDomainInputDef *virDomainInputDefPtr; + +typedef struct _virDomainSoundCodecDef virDomainSoundCodecDef; +typedef virDomainSoundCodecDef *virDomainSoundCodecDefPtr; + +typedef struct _virDomainSoundDef virDomainSoundDef; +typedef virDomainSoundDef *virDomainSoundDefPtr; + +typedef struct _virDomainVideoDef virDomainVideoDef; +typedef virDomainVideoDef *virDomainVideoDefPtr; + +typedef struct _virDomainHostdevDef virDomainHostdevDef; +typedef virDomainHostdevDef *virDomainHostdevDefPtr; + +typedef struct _virDomainWatchdogDef virDomainWatchdogDef; +typedef virDomainWatchdogDef *virDomainWatchdogDefPtr; + +typedef struct _virDomainGraphicsDef virDomainGraphicsDef; +typedef virDomainGraphicsDef *virDomainGraphicsDefPtr; + +typedef struct _virDomainHubDef virDomainHubDef; +typedef virDomainHubDef *virDomainHubDefPtr; + +typedef struct _virDomainRedirdevDef virDomainRedirdevDef; +typedef virDomainRedirdevDef *virDomainRedirdevDefPtr; + +typedef struct _virDomainRedirFilterUSBDevDef virDomainRedirFilterUSBDevDef; +typedef virDomainRedirFilterUSBDevDef *virDomainRedirFilterUSBDevDefPtr; + +typedef struct _virDomainRedirFilterDef virDomainRedirFilterDef; +typedef virDomainRedirFilterDef *virDomainRedirFilterDefPtr; + +typedef struct _virDomainSmartcardDef virDomainSmartcardDef; +typedef virDomainSmartcardDef *virDomainSmartcardDefPtr; + +typedef struct _virDomainChrDef virDomainChrDef; +typedef virDomainChrDef *virDomainChrDefPtr; + +typedef struct _virDomainMemballoonDef virDomainMemballoonDef; +typedef virDomainMemballoonDef *virDomainMemballoonDefPtr; + +typedef struct _virDomainNVRAMDef virDomainNVRAMDef; +typedef virDomainNVRAMDef *virDomainNVRAMDefPtr; + +typedef struct _virDomainSnapshotObj virDomainSnapshotObj; +typedef virDomainSnapshotObj *virDomainSnapshotObjPtr; + +typedef struct _virDomainSnapshotObjList virDomainSnapshotObjList; +typedef virDomainSnapshotObjList *virDomainSnapshotObjListPtr; + +typedef struct _virDomainRNGDef virDomainRNGDef; +typedef virDomainRNGDef *virDomainRNGDefPtr; + +typedef struct _virDomainIdMapEntry virDomainIdMapEntry; +typedef virDomainIdMapEntry *virDomainIdMapEntryPtr; + +typedef struct _virDomainIdMapDef virDomainIdMapDef; +typedef virDomainIdMapDef *virDomainIdMapDefPtr; + +typedef struct _virDomainPanicDef virDomainPanicDef; +typedef virDomainPanicDef *virDomainPanicDefPtr; + +typedef struct _virDomainMemoryDef virDomainMemoryDef; +typedef virDomainMemoryDef *virDomainMemoryDefPtr; + +typedef struct _virDomainChrSourceDef virDomainChrSourceDef; +typedef virDomainChrSourceDef *virDomainChrSourceDefPtr; + +typedef struct _virDomainShmemDef virDomainShmemDef; +typedef virDomainShmemDef *virDomainShmemDefPtr; + +typedef struct _virDomainTPMDef virDomainTPMDef; +typedef virDomainTPMDef *virDomainTPMDefPtr; + +typedef struct _virDomainIOMMUDef virDomainIOMMUDef; +typedef virDomainIOMMUDef *virDomainIOMMUDefPtr; + +typedef struct _virDomainVsockDef virDomainVsockDef; +typedef virDomainVsockDef *virDomainVsockDefPtr; + +typedef struct _virDomainVirtioOptions virDomainVirtioOptions; +typedef virDomainVirtioOptions *virDomainVirtioOptionsPtr; + +typedef struct _virDomainDeviceDef virDomainDeviceDef; +typedef virDomainDeviceDef *virDomainDeviceDefPtr; + +typedef struct _virDomainHostdevOrigStates virDomainHostdevOrigStates; +typedef virDomainHostdevOrigStates *virDomainHostdevOrigStatesPtr; + +typedef struct _virDomainHostdevSubsysUSB virDomainHostdevSubsysUSB; +typedef virDomainHostdevSubsysUSB *virDomainHostdevSubsysUSBPtr; + +typedef struct _virDomainHostdevSubsysPCI virDomainHostdevSubsysPCI; +typedef virDomainHostdevSubsysPCI *virDomainHostdevSubsysPCIPtr; + +typedef struct _virDomainHostdevSubsysSCSIHost virDomainHostdevSubsysSCSIHost; +typedef virDomainHostdevSubsysSCSIHost *virDomainHostdevSubsysSCSIHostPtr; + +typedef struct _virDomainHostdevSubsysSCSIiSCSI virDomainHostdevSubsysSCSIiSCSI; +typedef virDomainHostdevSubsysSCSIiSCSI *virDomainHostdevSubsysSCSIiSCSIPtr; + +typedef struct _virDomainHostdevSubsysSCSI virDomainHostdevSubsysSCSI; +typedef virDomainHostdevSubsysSCSI *virDomainHostdevSubsysSCSIPtr; + +typedef struct _virDomainHostdevSubsysMediatedDev virDomainHostdevSubsysMediatedDev; +typedef virDomainHostdevSubsysMediatedDev *virDomainHostdevSubsysMediatedDevPtr; + +typedef struct _virDomainHostdevSubsysSCSIVHost virDomainHostdevSubsysSCSIVHost; +typedef virDomainHostdevSubsysSCSIVHost *virDomainHostdevSubsysSCSIVHostPtr; + +typedef struct _virDomainHostdevSubsys virDomainHostdevSubsys; +typedef virDomainHostdevSubsys *virDomainHostdevSubsysPtr; + +typedef struct _virDomainHostdevCaps virDomainHostdevCaps; +typedef virDomainHostdevCaps *virDomainHostdevCapsPtr; + +typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo; +typedef virDomainBlockIoTuneInfo *virDomainBlockIoTuneInfoPtr; + +typedef struct _virDomainVirtioSerialOpts virDomainVirtioSerialOpts; +typedef virDomainVirtioSerialOpts *virDomainVirtioSerialOptsPtr; + +typedef struct _virDomainPCIControllerOpts virDomainPCIControllerOpts; +typedef virDomainPCIControllerOpts *virDomainPCIControllerOptsPtr; + +typedef struct _virDomainUSBControllerOpts virDomainUSBControllerOpts; +typedef virDomainUSBControllerOpts *virDomainUSBControllerOptsPtr; + +typedef struct _virDomainXenbusControllerOpts virDomainXenbusControllerOpts; +typedef virDomainXenbusControllerOpts *virDomainXenbusControllerOptsPtr; + +typedef struct _virDomainActualNetDef virDomainActualNetDef; +typedef virDomainActualNetDef *virDomainActualNetDefPtr; + +typedef struct _virDomainChrSourceReconnectDef virDomainChrSourceReconnectDef; +typedef virDomainChrSourceReconnectDef *virDomainChrSourceReconnectDefPtr; + +typedef struct _virDomainVideoAccelDef virDomainVideoAccelDef; +typedef virDomainVideoAccelDef *virDomainVideoAccelDefPtr; + +typedef struct _virDomainVideoDriverDef virDomainVideoDriverDef; +typedef virDomainVideoDriverDef *virDomainVideoDriverDefPtr; + +typedef struct _virDomainGraphicsAuthDef virDomainGraphicsAuthDef; +typedef virDomainGraphicsAuthDef *virDomainGraphicsAuthDefPtr; + +typedef struct _virDomainGraphicsListenDef virDomainGraphicsListenDef; +typedef virDomainGraphicsListenDef *virDomainGraphicsListenDefPtr; + +typedef struct _virDomainBIOSDef virDomainBIOSDef; +typedef virDomainBIOSDef *virDomainBIOSDefPtr; + +typedef struct _virDomainLoaderDef virDomainLoaderDef; +typedef virDomainLoaderDef *virDomainLoaderDefPtr; + +typedef struct _virDomainOSEnv virDomainOSEnv; +typedef virDomainOSEnv *virDomainOSEnvPtr; + +typedef struct _virDomainOSDef virDomainOSDef; +typedef virDomainOSDef *virDomainOSDefPtr; + +typedef struct _virDomainThreadSchedParam virDomainThreadSchedParam; +typedef virDomainThreadSchedParam *virDomainThreadSchedParamPtr; + +typedef struct _virDomainTimerCatchupDef virDomainTimerCatchupDef; +typedef virDomainTimerCatchupDef *virDomainTimerCatchupDefPtr; + +typedef struct _virDomainTimerDef virDomainTimerDef; +typedef virDomainTimerDef *virDomainTimerDefPtr; + +typedef struct _virDomainClockDef virDomainClockDef; +typedef virDomainClockDef *virDomainClockDefPtr; + +typedef struct _virBlkioDevice virBlkioDevice; +typedef virBlkioDevice *virBlkioDevicePtr; + +typedef struct _virDomainResourceDef virDomainResourceDef; +typedef virDomainResourceDef *virDomainResourceDefPtr; + +typedef struct _virDomainHugePage virDomainHugePage; +typedef virDomainHugePage *virDomainHugePagePtr; + +typedef struct _virDomainIOThreadIDDef virDomainIOThreadIDDef; +typedef virDomainIOThreadIDDef *virDomainIOThreadIDDefPtr; + +typedef struct _virDomainCputune virDomainCputune; +typedef virDomainCputune *virDomainCputunePtr; + +typedef struct _virDomainResctrlMonDef virDomainResctrlMonDef; +typedef virDomainResctrlMonDef *virDomainResctrlMonDefPtr; + +typedef struct _virDomainResctrlDef virDomainResctrlDef; +typedef virDomainResctrlDef *virDomainResctrlDefPtr; + +typedef struct _virDomainVcpuDef virDomainVcpuDef; +typedef virDomainVcpuDef *virDomainVcpuDefPtr; + +typedef struct _virDomainBlkiotune virDomainBlkiotune; +typedef virDomainBlkiotune *virDomainBlkiotunePtr; + +typedef struct _virDomainMemtune virDomainMemtune; +typedef virDomainMemtune *virDomainMemtunePtr; + +typedef struct _virDomainPowerManagement virDomainPowerManagement; +typedef virDomainPowerManagement *virDomainPowerManagementPtr; + +typedef struct _virDomainPerfDef virDomainPerfDef; +typedef virDomainPerfDef *virDomainPerfDefPtr; + +typedef struct _virDomainKeyWrapDef virDomainKeyWrapDef; +typedef virDomainKeyWrapDef *virDomainKeyWrapDefPtr; + +typedef struct _virDomainSEVDef virDomainSEVDef; +typedef virDomainSEVDef *virDomainSEVDefPtr; + +typedef struct _virDomainDef virDomainDef; +typedef virDomainDef *virDomainDefPtr; + +typedef struct _virDomainObj virDomainObj; +typedef virDomainObj *virDomainObjPtr; + +typedef struct _virDomainXMLOption virDomainXMLOption; +typedef virDomainXMLOption *virDomainXMLOptionPtr; + +typedef struct _virDomainDefParserConfig virDomainDefParserConfig; +typedef virDomainDefParserConfig *virDomainDefParserConfigPtr; + +typedef struct _virDomainXMLPrivateDataCallbacks virDomainXMLPrivateDataCallbacks; +typedef virDomainXMLPrivateDataCallbacks *virDomainXMLPrivateDataCallbacksPtr; + +typedef struct _virDomainABIStability virDomainABIStability; +typedef virDomainABIStability *virDomainABIStabilityPtr; + +#endif /* LIBVIRT_VIRCONFTYPES_H */ diff --git a/src/conf/Makefile.inc.am b/src/conf/Makefile.inc.am index fb2ec0e785..64d4436c6b 100644 --- a/src/conf/Makefile.inc.am +++ b/src/conf/Makefile.inc.am @@ -26,6 +26,7 @@ DOMAIN_CONF_SOURCES = \ conf/snapshot_conf.h \ conf/numa_conf.c \ conf/numa_conf.h \ + conf/virconftypes.h \ conf/virdomainobjlist.c \ conf/virdomainobjlist.h \ $(NULL) -- 2.20.1
[ not sure how John Snow got on the CC list. Hi, John! ] s/snapshot/conf/ in the summary On Fri, Mar 15, 2019 at 12:02:26AM -0500, Eric Blake wrote:
Right now, snapshot_conf.h is rather large - it deals with three separate types: virDomainSnapshotDef (the snapshot definition as it maps to XML), virDomainSnapshotObj (an object containing a def and the relationship to other snapshots), and virDomainSnapshotObjList (a list of snapshot objects), where two of the three types are currently public rather than opaque. What's more, the types are circular: a snapshot def includes a virDomainPtr, which contains a snapshot list, which includes a snapshot object, which includes a snapshot def.
In order to split the three objects into separate files, while still allowing each header to use sane typedefs to incomplete pointers, the obvious solution is to lift the typedefs into yet another header, with no other dependencies. Start the split by factoring out all struct typedefs from domain_conf.h (enum typedefs don't get used in function signatures, and function typedefs tend not to suffer from circular referencing, so those stay put). The only other excpetion is
exception
virDomainStateReason, which is only ever used directly rather than via a pointer.
This patch is just straight code motion (all typedefs are listed in the same order before and after the patch).
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/domain_conf.h | 220 +------------------------------ src/conf/virconftypes.h | 278 +++++++++++++++++++++++++++++++++++++++ src/conf/Makefile.inc.am | 1 + 3 files changed, 281 insertions(+), 218 deletions(-) create mode 100644 src/conf/virconftypes.h
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 50d2173654..538fb50b9e 100644
@@ -28,6 +28,7 @@ # include <libxml/xpath.h>
# include "internal.h" +# include "virconftypes.h"
The files in src conf do not use the vir prefix. How about "conf_types.h"?
# include "capabilities.h" # include "virstorageencryption.h" # include "cpu_conf.h" diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h new file mode 100644 index 0000000000..0e0dc3da03 --- /dev/null +++ b/src/conf/virconftypes.h @@ -0,0 +1,278 @@ +/* + * virconftypes.h: struct typedefs to avoid circular inclusion
+ * (derived from domain_conf.h)
I don't think this line is necessary
+ * + * Copyright (C) 2006-2019 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
Possibly inaccurate, but better than omitting it.
+ * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ +
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
On 3/15/19 7:46 AM, Ján Tomko wrote:
[ not sure how John Snow got on the CC list. Hi, John! ]
s/snapshot/conf/ in the summary
Sure. It's related to my work on snapshots, but independent enough (and doesn't even touch snapshot_conf).
On Fri, Mar 15, 2019 at 12:02:26AM -0500, Eric Blake wrote:
Right now, snapshot_conf.h is rather large - it deals with three separate types: virDomainSnapshotDef (the snapshot definition as it maps to XML), virDomainSnapshotObj (an object containing a def and the relationship to other snapshots), and virDomainSnapshotObjList (a list of snapshot objects), where two of the three types are currently public rather than opaque. What's more, the types are circular: a snapshot def includes a virDomainPtr, which contains a snapshot list, which includes a snapshot object, which includes a snapshot def.
In order to split the three objects into separate files, while still allowing each header to use sane typedefs to incomplete pointers, the obvious solution is to lift the typedefs into yet another header, with no other dependencies. Start the split by factoring out all struct typedefs from domain_conf.h (enum typedefs don't get used in function signatures, and function typedefs tend not to suffer from circular referencing, so those stay put). The only other excpetion is
exception
I can't type late at night :)
# include "internal.h" +# include "virconftypes.h"
The files in src conf do not use the vir prefix. How about "conf_types.h"?
Naming is hard. I can live with that.
# include "capabilities.h" # include "virstorageencryption.h" # include "cpu_conf.h" diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h new file mode 100644 index 0000000000..0e0dc3da03 --- /dev/null +++ b/src/conf/virconftypes.h @@ -0,0 +1,278 @@ +/* + * virconftypes.h: struct typedefs to avoid circular inclusion
+ * (derived from domain_conf.h)
I don't think this line is necessary
I don't mind dropping it; but it does explain the long copyright list:
+ * + * Copyright (C) 2006-2019 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
Possibly inaccurate, but better than omitting it.
Yeah, but when splitting files, it's easier to bulk copy the previous attributions than to figure out what can be culled.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Jano
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On 3/15/19 8:21 AM, Eric Blake wrote:
On 3/15/19 7:46 AM, Ján Tomko wrote:
[ not sure how John Snow got on the CC list. Hi, John! ]
s/snapshot/conf/ in the summary
Sure. It's related to my work on snapshots, but independent enough (and doesn't even touch snapshot_conf).
# include "internal.h" +# include "virconftypes.h"
The files in src conf do not use the vir prefix. How about "conf_types.h"?
Naming is hard. I can live with that.
Actually, I'm leaning towards keeping the "vir" prefix (to avoid any chance of ever including a wrong file from outside of libvirt), and as you noticed we DO have other (newer) files in src/conf/ with a vir prefix. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
It's easier to locate a typedef if they are stored in sorted order; do so mechanically via: $ sed -i '/typedef struct/ {N; N; s/\n//g}' src/conf/virconftypes.h $ # sorting the lines $ sed -i '/typedef struct/ s/;/;\n/g' src/conf/virconftypes.h Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/virconftypes.h | 340 ++++++++++++++++++++-------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index 0e0dc3da03..c4896ff769 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -26,183 +26,210 @@ /* forward declarations of various types required in src/conf */ -typedef struct _virDomainDiskDef virDomainDiskDef; -typedef virDomainDiskDef *virDomainDiskDefPtr; +typedef struct _virBlkioDevice virBlkioDevice; +typedef virBlkioDevice *virBlkioDevicePtr; -typedef struct _virDomainControllerDef virDomainControllerDef; -typedef virDomainControllerDef *virDomainControllerDefPtr; +typedef struct _virDomainABIStability virDomainABIStability; +typedef virDomainABIStability *virDomainABIStabilityPtr; -typedef struct _virDomainLeaseDef virDomainLeaseDef; -typedef virDomainLeaseDef *virDomainLeaseDefPtr; +typedef struct _virDomainActualNetDef virDomainActualNetDef; +typedef virDomainActualNetDef *virDomainActualNetDefPtr; -typedef struct _virDomainFSDef virDomainFSDef; -typedef virDomainFSDef *virDomainFSDefPtr; +typedef struct _virDomainBIOSDef virDomainBIOSDef; +typedef virDomainBIOSDef *virDomainBIOSDefPtr; -typedef struct _virDomainNetDef virDomainNetDef; -typedef virDomainNetDef *virDomainNetDefPtr; +typedef struct _virDomainBlkiotune virDomainBlkiotune; +typedef virDomainBlkiotune *virDomainBlkiotunePtr; -typedef struct _virDomainInputDef virDomainInputDef; -typedef virDomainInputDef *virDomainInputDefPtr; - -typedef struct _virDomainSoundCodecDef virDomainSoundCodecDef; -typedef virDomainSoundCodecDef *virDomainSoundCodecDefPtr; - -typedef struct _virDomainSoundDef virDomainSoundDef; -typedef virDomainSoundDef *virDomainSoundDefPtr; - -typedef struct _virDomainVideoDef virDomainVideoDef; -typedef virDomainVideoDef *virDomainVideoDefPtr; - -typedef struct _virDomainHostdevDef virDomainHostdevDef; -typedef virDomainHostdevDef *virDomainHostdevDefPtr; - -typedef struct _virDomainWatchdogDef virDomainWatchdogDef; -typedef virDomainWatchdogDef *virDomainWatchdogDefPtr; - -typedef struct _virDomainGraphicsDef virDomainGraphicsDef; -typedef virDomainGraphicsDef *virDomainGraphicsDefPtr; - -typedef struct _virDomainHubDef virDomainHubDef; -typedef virDomainHubDef *virDomainHubDefPtr; - -typedef struct _virDomainRedirdevDef virDomainRedirdevDef; -typedef virDomainRedirdevDef *virDomainRedirdevDefPtr; - -typedef struct _virDomainRedirFilterUSBDevDef virDomainRedirFilterUSBDevDef; -typedef virDomainRedirFilterUSBDevDef *virDomainRedirFilterUSBDevDefPtr; - -typedef struct _virDomainRedirFilterDef virDomainRedirFilterDef; -typedef virDomainRedirFilterDef *virDomainRedirFilterDefPtr; - -typedef struct _virDomainSmartcardDef virDomainSmartcardDef; -typedef virDomainSmartcardDef *virDomainSmartcardDefPtr; +typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo; +typedef virDomainBlockIoTuneInfo *virDomainBlockIoTuneInfoPtr; typedef struct _virDomainChrDef virDomainChrDef; typedef virDomainChrDef *virDomainChrDefPtr; -typedef struct _virDomainMemballoonDef virDomainMemballoonDef; -typedef virDomainMemballoonDef *virDomainMemballoonDefPtr; - -typedef struct _virDomainNVRAMDef virDomainNVRAMDef; -typedef virDomainNVRAMDef *virDomainNVRAMDefPtr; - -typedef struct _virDomainSnapshotObj virDomainSnapshotObj; -typedef virDomainSnapshotObj *virDomainSnapshotObjPtr; - -typedef struct _virDomainSnapshotObjList virDomainSnapshotObjList; -typedef virDomainSnapshotObjList *virDomainSnapshotObjListPtr; - -typedef struct _virDomainRNGDef virDomainRNGDef; -typedef virDomainRNGDef *virDomainRNGDefPtr; - -typedef struct _virDomainIdMapEntry virDomainIdMapEntry; -typedef virDomainIdMapEntry *virDomainIdMapEntryPtr; - -typedef struct _virDomainIdMapDef virDomainIdMapDef; -typedef virDomainIdMapDef *virDomainIdMapDefPtr; - -typedef struct _virDomainPanicDef virDomainPanicDef; -typedef virDomainPanicDef *virDomainPanicDefPtr; - -typedef struct _virDomainMemoryDef virDomainMemoryDef; -typedef virDomainMemoryDef *virDomainMemoryDefPtr; - typedef struct _virDomainChrSourceDef virDomainChrSourceDef; typedef virDomainChrSourceDef *virDomainChrSourceDefPtr; -typedef struct _virDomainShmemDef virDomainShmemDef; -typedef virDomainShmemDef *virDomainShmemDefPtr; +typedef struct _virDomainChrSourceReconnectDef virDomainChrSourceReconnectDef; +typedef virDomainChrSourceReconnectDef *virDomainChrSourceReconnectDefPtr; -typedef struct _virDomainTPMDef virDomainTPMDef; -typedef virDomainTPMDef *virDomainTPMDefPtr; +typedef struct _virDomainClockDef virDomainClockDef; +typedef virDomainClockDef *virDomainClockDefPtr; -typedef struct _virDomainIOMMUDef virDomainIOMMUDef; -typedef virDomainIOMMUDef *virDomainIOMMUDefPtr; +typedef struct _virDomainControllerDef virDomainControllerDef; +typedef virDomainControllerDef *virDomainControllerDefPtr; -typedef struct _virDomainVsockDef virDomainVsockDef; -typedef virDomainVsockDef *virDomainVsockDefPtr; +typedef struct _virDomainCputune virDomainCputune; +typedef virDomainCputune *virDomainCputunePtr; -typedef struct _virDomainVirtioOptions virDomainVirtioOptions; -typedef virDomainVirtioOptions *virDomainVirtioOptionsPtr; +typedef struct _virDomainDef virDomainDef; +typedef virDomainDef *virDomainDefPtr; + +typedef struct _virDomainDefParserConfig virDomainDefParserConfig; +typedef virDomainDefParserConfig *virDomainDefParserConfigPtr; typedef struct _virDomainDeviceDef virDomainDeviceDef; typedef virDomainDeviceDef *virDomainDeviceDefPtr; +typedef struct _virDomainDiskDef virDomainDiskDef; +typedef virDomainDiskDef *virDomainDiskDefPtr; + +typedef struct _virDomainFSDef virDomainFSDef; +typedef virDomainFSDef *virDomainFSDefPtr; + +typedef struct _virDomainGraphicsAuthDef virDomainGraphicsAuthDef; +typedef virDomainGraphicsAuthDef *virDomainGraphicsAuthDefPtr; + +typedef struct _virDomainGraphicsDef virDomainGraphicsDef; +typedef virDomainGraphicsDef *virDomainGraphicsDefPtr; + +typedef struct _virDomainGraphicsListenDef virDomainGraphicsListenDef; +typedef virDomainGraphicsListenDef *virDomainGraphicsListenDefPtr; + +typedef struct _virDomainHostdevCaps virDomainHostdevCaps; +typedef virDomainHostdevCaps *virDomainHostdevCapsPtr; + +typedef struct _virDomainHostdevDef virDomainHostdevDef; +typedef virDomainHostdevDef *virDomainHostdevDefPtr; + typedef struct _virDomainHostdevOrigStates virDomainHostdevOrigStates; typedef virDomainHostdevOrigStates *virDomainHostdevOrigStatesPtr; -typedef struct _virDomainHostdevSubsysUSB virDomainHostdevSubsysUSB; -typedef virDomainHostdevSubsysUSB *virDomainHostdevSubsysUSBPtr; +typedef struct _virDomainHostdevSubsys virDomainHostdevSubsys; +typedef virDomainHostdevSubsys *virDomainHostdevSubsysPtr; + +typedef struct _virDomainHostdevSubsysMediatedDev virDomainHostdevSubsysMediatedDev; +typedef virDomainHostdevSubsysMediatedDev *virDomainHostdevSubsysMediatedDevPtr; typedef struct _virDomainHostdevSubsysPCI virDomainHostdevSubsysPCI; typedef virDomainHostdevSubsysPCI *virDomainHostdevSubsysPCIPtr; -typedef struct _virDomainHostdevSubsysSCSIHost virDomainHostdevSubsysSCSIHost; -typedef virDomainHostdevSubsysSCSIHost *virDomainHostdevSubsysSCSIHostPtr; - -typedef struct _virDomainHostdevSubsysSCSIiSCSI virDomainHostdevSubsysSCSIiSCSI; -typedef virDomainHostdevSubsysSCSIiSCSI *virDomainHostdevSubsysSCSIiSCSIPtr; - typedef struct _virDomainHostdevSubsysSCSI virDomainHostdevSubsysSCSI; typedef virDomainHostdevSubsysSCSI *virDomainHostdevSubsysSCSIPtr; -typedef struct _virDomainHostdevSubsysMediatedDev virDomainHostdevSubsysMediatedDev; -typedef virDomainHostdevSubsysMediatedDev *virDomainHostdevSubsysMediatedDevPtr; +typedef struct _virDomainHostdevSubsysSCSIHost virDomainHostdevSubsysSCSIHost; +typedef virDomainHostdevSubsysSCSIHost *virDomainHostdevSubsysSCSIHostPtr; typedef struct _virDomainHostdevSubsysSCSIVHost virDomainHostdevSubsysSCSIVHost; typedef virDomainHostdevSubsysSCSIVHost *virDomainHostdevSubsysSCSIVHostPtr; -typedef struct _virDomainHostdevSubsys virDomainHostdevSubsys; -typedef virDomainHostdevSubsys *virDomainHostdevSubsysPtr; +typedef struct _virDomainHostdevSubsysSCSIiSCSI virDomainHostdevSubsysSCSIiSCSI; +typedef virDomainHostdevSubsysSCSIiSCSI *virDomainHostdevSubsysSCSIiSCSIPtr; -typedef struct _virDomainHostdevCaps virDomainHostdevCaps; -typedef virDomainHostdevCaps *virDomainHostdevCapsPtr; +typedef struct _virDomainHostdevSubsysUSB virDomainHostdevSubsysUSB; +typedef virDomainHostdevSubsysUSB *virDomainHostdevSubsysUSBPtr; -typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo; -typedef virDomainBlockIoTuneInfo *virDomainBlockIoTuneInfoPtr; +typedef struct _virDomainHubDef virDomainHubDef; +typedef virDomainHubDef *virDomainHubDefPtr; -typedef struct _virDomainVirtioSerialOpts virDomainVirtioSerialOpts; -typedef virDomainVirtioSerialOpts *virDomainVirtioSerialOptsPtr; +typedef struct _virDomainHugePage virDomainHugePage; +typedef virDomainHugePage *virDomainHugePagePtr; -typedef struct _virDomainPCIControllerOpts virDomainPCIControllerOpts; -typedef virDomainPCIControllerOpts *virDomainPCIControllerOptsPtr; +typedef struct _virDomainIOMMUDef virDomainIOMMUDef; +typedef virDomainIOMMUDef *virDomainIOMMUDefPtr; -typedef struct _virDomainUSBControllerOpts virDomainUSBControllerOpts; -typedef virDomainUSBControllerOpts *virDomainUSBControllerOptsPtr; +typedef struct _virDomainIOThreadIDDef virDomainIOThreadIDDef; +typedef virDomainIOThreadIDDef *virDomainIOThreadIDDefPtr; -typedef struct _virDomainXenbusControllerOpts virDomainXenbusControllerOpts; -typedef virDomainXenbusControllerOpts *virDomainXenbusControllerOptsPtr; +typedef struct _virDomainIdMapDef virDomainIdMapDef; +typedef virDomainIdMapDef *virDomainIdMapDefPtr; -typedef struct _virDomainActualNetDef virDomainActualNetDef; -typedef virDomainActualNetDef *virDomainActualNetDefPtr; +typedef struct _virDomainIdMapEntry virDomainIdMapEntry; +typedef virDomainIdMapEntry *virDomainIdMapEntryPtr; -typedef struct _virDomainChrSourceReconnectDef virDomainChrSourceReconnectDef; -typedef virDomainChrSourceReconnectDef *virDomainChrSourceReconnectDefPtr; +typedef struct _virDomainInputDef virDomainInputDef; +typedef virDomainInputDef *virDomainInputDefPtr; -typedef struct _virDomainVideoAccelDef virDomainVideoAccelDef; -typedef virDomainVideoAccelDef *virDomainVideoAccelDefPtr; +typedef struct _virDomainKeyWrapDef virDomainKeyWrapDef; +typedef virDomainKeyWrapDef *virDomainKeyWrapDefPtr; -typedef struct _virDomainVideoDriverDef virDomainVideoDriverDef; -typedef virDomainVideoDriverDef *virDomainVideoDriverDefPtr; - -typedef struct _virDomainGraphicsAuthDef virDomainGraphicsAuthDef; -typedef virDomainGraphicsAuthDef *virDomainGraphicsAuthDefPtr; - -typedef struct _virDomainGraphicsListenDef virDomainGraphicsListenDef; -typedef virDomainGraphicsListenDef *virDomainGraphicsListenDefPtr; - -typedef struct _virDomainBIOSDef virDomainBIOSDef; -typedef virDomainBIOSDef *virDomainBIOSDefPtr; +typedef struct _virDomainLeaseDef virDomainLeaseDef; +typedef virDomainLeaseDef *virDomainLeaseDefPtr; typedef struct _virDomainLoaderDef virDomainLoaderDef; typedef virDomainLoaderDef *virDomainLoaderDefPtr; -typedef struct _virDomainOSEnv virDomainOSEnv; -typedef virDomainOSEnv *virDomainOSEnvPtr; +typedef struct _virDomainMemballoonDef virDomainMemballoonDef; +typedef virDomainMemballoonDef *virDomainMemballoonDefPtr; + +typedef struct _virDomainMemoryDef virDomainMemoryDef; +typedef virDomainMemoryDef *virDomainMemoryDefPtr; + +typedef struct _virDomainMemtune virDomainMemtune; +typedef virDomainMemtune *virDomainMemtunePtr; + +typedef struct _virDomainNVRAMDef virDomainNVRAMDef; +typedef virDomainNVRAMDef *virDomainNVRAMDefPtr; + +typedef struct _virDomainNetDef virDomainNetDef; +typedef virDomainNetDef *virDomainNetDefPtr; typedef struct _virDomainOSDef virDomainOSDef; typedef virDomainOSDef *virDomainOSDefPtr; +typedef struct _virDomainOSEnv virDomainOSEnv; +typedef virDomainOSEnv *virDomainOSEnvPtr; + +typedef struct _virDomainObj virDomainObj; +typedef virDomainObj *virDomainObjPtr; + +typedef struct _virDomainPCIControllerOpts virDomainPCIControllerOpts; +typedef virDomainPCIControllerOpts *virDomainPCIControllerOptsPtr; + +typedef struct _virDomainPanicDef virDomainPanicDef; +typedef virDomainPanicDef *virDomainPanicDefPtr; + +typedef struct _virDomainPerfDef virDomainPerfDef; +typedef virDomainPerfDef *virDomainPerfDefPtr; + +typedef struct _virDomainPowerManagement virDomainPowerManagement; +typedef virDomainPowerManagement *virDomainPowerManagementPtr; + +typedef struct _virDomainRNGDef virDomainRNGDef; +typedef virDomainRNGDef *virDomainRNGDefPtr; + +typedef struct _virDomainRedirFilterDef virDomainRedirFilterDef; +typedef virDomainRedirFilterDef *virDomainRedirFilterDefPtr; + +typedef struct _virDomainRedirFilterUSBDevDef virDomainRedirFilterUSBDevDef; +typedef virDomainRedirFilterUSBDevDef *virDomainRedirFilterUSBDevDefPtr; + +typedef struct _virDomainRedirdevDef virDomainRedirdevDef; +typedef virDomainRedirdevDef *virDomainRedirdevDefPtr; + +typedef struct _virDomainResctrlDef virDomainResctrlDef; +typedef virDomainResctrlDef *virDomainResctrlDefPtr; + +typedef struct _virDomainResctrlMonDef virDomainResctrlMonDef; +typedef virDomainResctrlMonDef *virDomainResctrlMonDefPtr; + +typedef struct _virDomainResourceDef virDomainResourceDef; +typedef virDomainResourceDef *virDomainResourceDefPtr; + +typedef struct _virDomainSEVDef virDomainSEVDef; +typedef virDomainSEVDef *virDomainSEVDefPtr; + +typedef struct _virDomainShmemDef virDomainShmemDef; +typedef virDomainShmemDef *virDomainShmemDefPtr; + +typedef struct _virDomainSmartcardDef virDomainSmartcardDef; +typedef virDomainSmartcardDef *virDomainSmartcardDefPtr; + +typedef struct _virDomainSnapshotObj virDomainSnapshotObj; +typedef virDomainSnapshotObj *virDomainSnapshotObjPtr; + +typedef struct _virDomainSnapshotObjList virDomainSnapshotObjList; +typedef virDomainSnapshotObjList *virDomainSnapshotObjListPtr; + +typedef struct _virDomainSoundCodecDef virDomainSoundCodecDef; +typedef virDomainSoundCodecDef *virDomainSoundCodecDefPtr; + +typedef struct _virDomainSoundDef virDomainSoundDef; +typedef virDomainSoundDef *virDomainSoundDefPtr; + +typedef struct _virDomainTPMDef virDomainTPMDef; +typedef virDomainTPMDef *virDomainTPMDefPtr; + typedef struct _virDomainThreadSchedParam virDomainThreadSchedParam; typedef virDomainThreadSchedParam *virDomainThreadSchedParamPtr; @@ -212,67 +239,40 @@ typedef virDomainTimerCatchupDef *virDomainTimerCatchupDefPtr; typedef struct _virDomainTimerDef virDomainTimerDef; typedef virDomainTimerDef *virDomainTimerDefPtr; -typedef struct _virDomainClockDef virDomainClockDef; -typedef virDomainClockDef *virDomainClockDefPtr; - -typedef struct _virBlkioDevice virBlkioDevice; -typedef virBlkioDevice *virBlkioDevicePtr; - -typedef struct _virDomainResourceDef virDomainResourceDef; -typedef virDomainResourceDef *virDomainResourceDefPtr; - -typedef struct _virDomainHugePage virDomainHugePage; -typedef virDomainHugePage *virDomainHugePagePtr; - -typedef struct _virDomainIOThreadIDDef virDomainIOThreadIDDef; -typedef virDomainIOThreadIDDef *virDomainIOThreadIDDefPtr; - -typedef struct _virDomainCputune virDomainCputune; -typedef virDomainCputune *virDomainCputunePtr; - -typedef struct _virDomainResctrlMonDef virDomainResctrlMonDef; -typedef virDomainResctrlMonDef *virDomainResctrlMonDefPtr; - -typedef struct _virDomainResctrlDef virDomainResctrlDef; -typedef virDomainResctrlDef *virDomainResctrlDefPtr; +typedef struct _virDomainUSBControllerOpts virDomainUSBControllerOpts; +typedef virDomainUSBControllerOpts *virDomainUSBControllerOptsPtr; typedef struct _virDomainVcpuDef virDomainVcpuDef; typedef virDomainVcpuDef *virDomainVcpuDefPtr; -typedef struct _virDomainBlkiotune virDomainBlkiotune; -typedef virDomainBlkiotune *virDomainBlkiotunePtr; +typedef struct _virDomainVideoAccelDef virDomainVideoAccelDef; +typedef virDomainVideoAccelDef *virDomainVideoAccelDefPtr; -typedef struct _virDomainMemtune virDomainMemtune; -typedef virDomainMemtune *virDomainMemtunePtr; +typedef struct _virDomainVideoDef virDomainVideoDef; +typedef virDomainVideoDef *virDomainVideoDefPtr; -typedef struct _virDomainPowerManagement virDomainPowerManagement; -typedef virDomainPowerManagement *virDomainPowerManagementPtr; +typedef struct _virDomainVideoDriverDef virDomainVideoDriverDef; +typedef virDomainVideoDriverDef *virDomainVideoDriverDefPtr; -typedef struct _virDomainPerfDef virDomainPerfDef; -typedef virDomainPerfDef *virDomainPerfDefPtr; +typedef struct _virDomainVirtioOptions virDomainVirtioOptions; +typedef virDomainVirtioOptions *virDomainVirtioOptionsPtr; -typedef struct _virDomainKeyWrapDef virDomainKeyWrapDef; -typedef virDomainKeyWrapDef *virDomainKeyWrapDefPtr; +typedef struct _virDomainVirtioSerialOpts virDomainVirtioSerialOpts; +typedef virDomainVirtioSerialOpts *virDomainVirtioSerialOptsPtr; -typedef struct _virDomainSEVDef virDomainSEVDef; -typedef virDomainSEVDef *virDomainSEVDefPtr; +typedef struct _virDomainVsockDef virDomainVsockDef; +typedef virDomainVsockDef *virDomainVsockDefPtr; -typedef struct _virDomainDef virDomainDef; -typedef virDomainDef *virDomainDefPtr; - -typedef struct _virDomainObj virDomainObj; -typedef virDomainObj *virDomainObjPtr; +typedef struct _virDomainWatchdogDef virDomainWatchdogDef; +typedef virDomainWatchdogDef *virDomainWatchdogDefPtr; typedef struct _virDomainXMLOption virDomainXMLOption; typedef virDomainXMLOption *virDomainXMLOptionPtr; -typedef struct _virDomainDefParserConfig virDomainDefParserConfig; -typedef virDomainDefParserConfig *virDomainDefParserConfigPtr; - typedef struct _virDomainXMLPrivateDataCallbacks virDomainXMLPrivateDataCallbacks; typedef virDomainXMLPrivateDataCallbacks *virDomainXMLPrivateDataCallbacksPtr; -typedef struct _virDomainABIStability virDomainABIStability; -typedef virDomainABIStability *virDomainABIStabilityPtr; +typedef struct _virDomainXenbusControllerOpts virDomainXenbusControllerOpts; +typedef virDomainXenbusControllerOpts *virDomainXenbusControllerOptsPtr; #endif /* LIBVIRT_VIRCONFTYPES_H */ -- 2.20.1
On Fri, Mar 15, 2019 at 12:02:27AM -0500, Eric Blake wrote:
It's easier to locate a typedef if they are stored in sorted order; do so mechanically via:
$ sed -i '/typedef struct/ {N; N; s/\n//g}' src/conf/virconftypes.h $ # sorting the lines $ sed -i '/typedef struct/ s/;/;\n/g' src/conf/virconftypes.h
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/virconftypes.h | 340 ++++++++++++++++++++-------------------- 1 file changed, 170 insertions(+), 170 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object code into its own file, which includes moving a typedef to avoid circular inclusions. Mostly straight code motion, although I fixed a comment along the way. Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/snapshot_conf.h | 20 +----- src/conf/virconftypes.h | 3 + src/conf/virdomainsnapshotobj.h | 50 +++++++++++++ src/conf/Makefile.inc.am | 2 + src/conf/snapshot_conf.c | 85 ---------------------- src/conf/virdomainsnapshotobj.c | 122 ++++++++++++++++++++++++++++++++ src/libvirt_private.syms | 9 ++- 7 files changed, 184 insertions(+), 107 deletions(-) create mode 100644 src/conf/virdomainsnapshotobj.h create mode 100644 src/conf/virdomainsnapshotobj.c diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h index 6d79dbb0da..444de05a71 100644 --- a/src/conf/snapshot_conf.h +++ b/src/conf/snapshot_conf.h @@ -24,6 +24,7 @@ # include "internal.h" # include "domain_conf.h" +# include "virdomainsnapshotobj.h" /* Items related to snapshot state */ @@ -71,8 +72,6 @@ struct _virDomainSnapshotDiskDef { }; /* Stores the complete snapshot metadata */ -typedef struct _virDomainSnapshotDef virDomainSnapshotDef; -typedef virDomainSnapshotDef *virDomainSnapshotDefPtr; struct _virDomainSnapshotDef { /* Public XML. */ char *name; @@ -95,16 +94,6 @@ struct _virDomainSnapshotDef { bool current; /* At most one snapshot in the list should have this set */ }; -struct _virDomainSnapshotObj { - virDomainSnapshotDefPtr def; /* non-NULL except for metaroot */ - - virDomainSnapshotObjPtr parent; /* non-NULL except for metaroot, before - virDomainSnapshotUpdateRelations, or - after virDomainSnapshotDropParent */ - virDomainSnapshotObjPtr sibling; /* NULL if last child of parent */ - size_t nchildren; - virDomainSnapshotObjPtr first_child; /* NULL if no children */ -}; virDomainSnapshotObjListPtr virDomainSnapshotObjListNew(void); void virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots); @@ -172,14 +161,7 @@ void virDomainSnapshotObjListRemove(virDomainSnapshotObjListPtr snapshots, int virDomainSnapshotForEach(virDomainSnapshotObjListPtr snapshots, virHashIterator iter, void *data); -int virDomainSnapshotForEachChild(virDomainSnapshotObjPtr snapshot, - virHashIterator iter, - void *data); -int virDomainSnapshotForEachDescendant(virDomainSnapshotObjPtr snapshot, - virHashIterator iter, - void *data); int virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots); -void virDomainSnapshotDropParent(virDomainSnapshotObjPtr snapshot); # define VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA \ (VIR_DOMAIN_SNAPSHOT_LIST_METADATA | \ diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index c4896ff769..a271c4e7f7 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -215,6 +215,9 @@ typedef virDomainShmemDef *virDomainShmemDefPtr; typedef struct _virDomainSmartcardDef virDomainSmartcardDef; typedef virDomainSmartcardDef *virDomainSmartcardDefPtr; +typedef struct _virDomainSnapshotDef virDomainSnapshotDef; +typedef virDomainSnapshotDef *virDomainSnapshotDefPtr; + typedef struct _virDomainSnapshotObj virDomainSnapshotObj; typedef virDomainSnapshotObj *virDomainSnapshotObjPtr; diff --git a/src/conf/virdomainsnapshotobj.h b/src/conf/virdomainsnapshotobj.h new file mode 100644 index 0000000000..957f1b2ea8 --- /dev/null +++ b/src/conf/virdomainsnapshotobj.h @@ -0,0 +1,50 @@ +/* + * virdomainsnapshotobj.h: handle snapshot objects + * (derived from snapshot_conf.h) + * + * Copyright (C) 2006-2019 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#ifndef LIBVIRT_VIRDOMAINSNAPSHOTOBJ_H +# define LIBVIRT_VIRDOMAINSNAPSHOTOBJ_H + +# include "internal.h" +# include "virconftypes.h" +# include "virhash.h" + +struct _virDomainSnapshotObj { + virDomainSnapshotDefPtr def; /* non-NULL except for metaroot */ + + virDomainSnapshotObjPtr parent; /* non-NULL except for metaroot, before + virDomainSnapshotUpdateRelations, or + after virDomainSnapshotDropParent */ + virDomainSnapshotObjPtr sibling; /* NULL if last child of parent */ + size_t nchildren; + virDomainSnapshotObjPtr first_child; /* NULL if no children */ +}; + + +int virDomainSnapshotForEachChild(virDomainSnapshotObjPtr snapshot, + virHashIterator iter, + void *data); +int virDomainSnapshotForEachDescendant(virDomainSnapshotObjPtr snapshot, + virHashIterator iter, + void *data); +void virDomainSnapshotDropParent(virDomainSnapshotObjPtr snapshot); + +#endif /* LIBVIRT_VIRDOMAINSNAPSHOTOBJ_H */ diff --git a/src/conf/Makefile.inc.am b/src/conf/Makefile.inc.am index 64d4436c6b..be941ee7e2 100644 --- a/src/conf/Makefile.inc.am +++ b/src/conf/Makefile.inc.am @@ -29,6 +29,8 @@ DOMAIN_CONF_SOURCES = \ conf/virconftypes.h \ conf/virdomainobjlist.c \ conf/virdomainobjlist.h \ + conf/virdomainsnapshotobj.c \ + conf/virdomainsnapshotobj.h \ $(NULL) OBJECT_EVENT_SOURCES = \ diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index e2c91a5072..3b0e527bb2 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -1299,64 +1299,6 @@ virDomainSnapshotForEach(virDomainSnapshotObjListPtr snapshots, return virHashForEach(snapshots->objs, iter, data); } -/* Run iter(data) on all direct children of snapshot, while ignoring all - * other entries in snapshots. Return the number of children - * visited. No particular ordering is guaranteed. */ -int -virDomainSnapshotForEachChild(virDomainSnapshotObjPtr snapshot, - virHashIterator iter, - void *data) -{ - virDomainSnapshotObjPtr child = snapshot->first_child; - - while (child) { - virDomainSnapshotObjPtr next = child->sibling; - (iter)(child, child->def->name, data); - child = next; - } - - return snapshot->nchildren; -} - -struct snapshot_act_on_descendant { - int number; - virHashIterator iter; - void *data; -}; - -static int -virDomainSnapshotActOnDescendant(void *payload, - const void *name, - void *data) -{ - virDomainSnapshotObjPtr obj = payload; - struct snapshot_act_on_descendant *curr = data; - - (curr->iter)(payload, name, curr->data); - curr->number += 1 + virDomainSnapshotForEachDescendant(obj, - curr->iter, - curr->data); - return 0; -} - -/* Run iter(data) on all descendants of snapshot, while ignoring all - * other entries in snapshots. Return the number of descendants - * visited. No particular ordering is guaranteed. */ -int -virDomainSnapshotForEachDescendant(virDomainSnapshotObjPtr snapshot, - virHashIterator iter, - void *data) -{ - struct snapshot_act_on_descendant act; - - act.number = 0; - act.iter = iter; - act.data = data; - virDomainSnapshotForEachChild(snapshot, - virDomainSnapshotActOnDescendant, &act); - - return act.number; -} /* Struct and callback function used as a hash table callback; each call * inspects the pre-existing snapshot->def->parent field, and adjusts @@ -1416,33 +1358,6 @@ virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots) return act.err; } -/* Prepare to reparent or delete snapshot, by removing it from its - * current listed parent. Note that when bulk removing all children - * of a parent, it is faster to just 0 the count rather than calling - * this function on each child. */ -void -virDomainSnapshotDropParent(virDomainSnapshotObjPtr snapshot) -{ - virDomainSnapshotObjPtr prev = NULL; - virDomainSnapshotObjPtr curr = NULL; - - snapshot->parent->nchildren--; - curr = snapshot->parent->first_child; - while (curr != snapshot) { - if (!curr) { - VIR_WARN("inconsistent snapshot relations"); - return; - } - prev = curr; - curr = curr->sibling; - } - if (prev) - prev->sibling = snapshot->sibling; - else - snapshot->parent->first_child = snapshot->sibling; - snapshot->parent = NULL; - snapshot->sibling = NULL; -} int virDomainListSnapshots(virDomainSnapshotObjListPtr snapshots, diff --git a/src/conf/virdomainsnapshotobj.c b/src/conf/virdomainsnapshotobj.c new file mode 100644 index 0000000000..487f0cc702 --- /dev/null +++ b/src/conf/virdomainsnapshotobj.c @@ -0,0 +1,122 @@ +/* + * virdomainsnapshotobj.c: handle snapshot objects + * (derived from snapshot_conf.c) + * + * Copyright (C) 2006-2019 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#include <config.h> + +#include "internal.h" +#include "virdomainsnapshotobj.h" +#include "snapshot_conf.h" +#include "virlog.h" +#include "virerror.h" + +#define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT + +VIR_LOG_INIT("conf.virdomainsnapshotobj"); + +/* Run iter(data) on all direct children of snapshot, while ignoring all + * other entries in snapshots. Return the number of children + * visited. No particular ordering is guaranteed. */ +int +virDomainSnapshotForEachChild(virDomainSnapshotObjPtr snapshot, + virHashIterator iter, + void *data) +{ + virDomainSnapshotObjPtr child = snapshot->first_child; + + while (child) { + virDomainSnapshotObjPtr next = child->sibling; + (iter)(child, child->def->name, data); + child = next; + } + + return snapshot->nchildren; +} + +struct snapshot_act_on_descendant { + int number; + virHashIterator iter; + void *data; +}; + +static int +virDomainSnapshotActOnDescendant(void *payload, + const void *name, + void *data) +{ + virDomainSnapshotObjPtr obj = payload; + struct snapshot_act_on_descendant *curr = data; + + (curr->iter)(payload, name, curr->data); + curr->number += 1 + virDomainSnapshotForEachDescendant(obj, + curr->iter, + curr->data); + return 0; +} + +/* Run iter(data) on all descendants of snapshot, while ignoring all + * other entries in snapshots. Return the number of descendants + * visited. The visit is guaranteed to be topological, but no + * particular order between siblings is guaranteed. */ +int +virDomainSnapshotForEachDescendant(virDomainSnapshotObjPtr snapshot, + virHashIterator iter, + void *data) +{ + struct snapshot_act_on_descendant act; + + act.number = 0; + act.iter = iter; + act.data = data; + virDomainSnapshotForEachChild(snapshot, + virDomainSnapshotActOnDescendant, &act); + + return act.number; +} + + +/* Prepare to reparent or delete snapshot, by removing it from its + * current listed parent. Note that when bulk removing all children + * of a parent, it is faster to just 0 the count rather than calling + * this function on each child. */ +void +virDomainSnapshotDropParent(virDomainSnapshotObjPtr snapshot) +{ + virDomainSnapshotObjPtr prev = NULL; + virDomainSnapshotObjPtr curr = NULL; + + snapshot->parent->nchildren--; + curr = snapshot->parent->first_child; + while (curr != snapshot) { + if (!curr) { + VIR_WARN("inconsistent snapshot relations"); + return; + } + prev = curr; + curr = curr->sibling; + } + if (prev) + prev->sibling = snapshot->sibling; + else + snapshot->parent->first_child = snapshot->sibling; + snapshot->parent = NULL; + snapshot->sibling = NULL; +} diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9582b72262..d775fe8551 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -890,11 +890,8 @@ virDomainSnapshotDefFormat; virDomainSnapshotDefFree; virDomainSnapshotDefIsExternal; virDomainSnapshotDefParseString; -virDomainSnapshotDropParent; virDomainSnapshotFindByName; virDomainSnapshotForEach; -virDomainSnapshotForEachChild; -virDomainSnapshotForEachDescendant; virDomainSnapshotFormatConvertXMLFlags; virDomainSnapshotIsExternal; virDomainSnapshotLocationTypeFromString; @@ -992,6 +989,12 @@ virDomainObjListRemoveLocked; virDomainObjListRename; +# conf/virdomainsnapshotobj.h +virDomainSnapshotDropParent; +virDomainSnapshotForEachChild; +virDomainSnapshotForEachDescendant; + + # conf/virinterfaceobj.h virInterfaceObjEndAPI; virInterfaceObjGetDef; -- 2.20.1
On Fri, Mar 15, 2019 at 12:02:28AM -0500, Eric Blake wrote:
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object code into its own file, which includes moving a typedef to avoid circular inclusions.
Mostly straight code motion, although I fixed a comment along the way.
Technically comments aren't code.
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/snapshot_conf.h | 20 +----- src/conf/virconftypes.h | 3 + src/conf/virdomainsnapshotobj.h | 50 +++++++++++++ src/conf/Makefile.inc.am | 2 + src/conf/snapshot_conf.c | 85 ---------------------- src/conf/virdomainsnapshotobj.c | 122 ++++++++++++++++++++++++++++++++ src/libvirt_private.syms | 9 ++- 7 files changed, 184 insertions(+), 107 deletions(-) create mode 100644 src/conf/virdomainsnapshotobj.h create mode 100644 src/conf/virdomainsnapshotobj.c
diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h index 6d79dbb0da..444de05a71 100644 --- a/src/conf/snapshot_conf.h +++ b/src/conf/snapshot_conf.h @@ -24,6 +24,7 @@
# include "internal.h" # include "domain_conf.h" +# include "virdomainsnapshotobj.h"
Oh, I found the other files using the 'vir' prefix and the no spacing approach.
/* Items related to snapshot state */
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
The next patch will require access to the helper functions virDomainSnapshotDefFormatInternal and virDomainSnapshotRedefineValidate from two different files; make the file split easier by exporting these functions. Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/snapshot_conf.h | 13 +++++++++++++ src/conf/snapshot_conf.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h index 444de05a71..c816ad06e1 100644 --- a/src/conf/snapshot_conf.h +++ b/src/conf/snapshot_conf.h @@ -134,6 +134,13 @@ char *virDomainSnapshotDefFormat(const char *uuidstr, virCapsPtr caps, virDomainXMLOptionPtr xmlopt, unsigned int flags); +int virDomainSnapshotDefFormatInternal(virBufferPtr buf, + const char *uuidstr, + virDomainSnapshotDefPtr def, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt, + unsigned int flags); + int virDomainSnapshotObjListFormat(virBufferPtr buf, const char *uuidstr, virDomainSnapshotObjListPtr snapshots, @@ -203,6 +210,12 @@ int virDomainSnapshotRedefinePrep(virDomainPtr domain, bool *update_current, unsigned int flags); +int virDomainSnapshotRedefineValidate(virDomainSnapshotDefPtr def, + const unsigned char *domain_uuid, + virDomainSnapshotObjPtr other, + virDomainXMLOptionPtr xmlopt, + unsigned int flags); + VIR_ENUM_DECL(virDomainSnapshotLocation); VIR_ENUM_DECL(virDomainSnapshotState); diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 3b0e527bb2..560150977b 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -429,7 +429,7 @@ virDomainSnapshotDefParseString(const char *xmlStr, /* Perform sanity checking on a redefined snapshot definition. If * @other is non-NULL, this may include swapping def->dom from other * into def. */ -static int +int virDomainSnapshotRedefineValidate(virDomainSnapshotDefPtr def, const unsigned char *domain_uuid, virDomainSnapshotObjPtr other, @@ -896,7 +896,7 @@ virDomainSnapshotDiskDefFormat(virBufferPtr buf, /* Append XML describing def into buf. Return 0 on success, or -1 on * failure with buf cleared. */ -static int +int virDomainSnapshotDefFormatInternal(virBufferPtr buf, const char *uuidstr, virDomainSnapshotDefPtr def, -- 2.20.1
On Fri, Mar 15, 2019 at 12:02:29AM -0500, Eric Blake wrote:
The next patch will require access to the helper functions virDomainSnapshotDefFormatInternal and virDomainSnapshotRedefineValidate from two different files; make the file split easier by exporting these functions.
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/snapshot_conf.h | 13 +++++++++++++ src/conf/snapshot_conf.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object list code into its own file, and update includes for affected clients. This is just code motion, but done in preparation of sharing a lot of the object list code with checkpoints. Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/snapshot_conf.h | 43 --- src/conf/virdomainsnapshotobjlist.h | 74 ++++ src/conf/Makefile.inc.am | 2 + src/conf/domain_conf.c | 1 + src/conf/snapshot_conf.c | 519 +------------------------- src/conf/virdomainobjlist.c | 1 + src/conf/virdomainsnapshotobj.c | 1 + src/conf/virdomainsnapshotobjlist.c | 553 ++++++++++++++++++++++++++++ src/libvirt_private.syms | 27 +- src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c | 1 + src/qemu/qemu_driver.c | 1 + src/qemu/qemu_migration.c | 1 + src/test/test_driver.c | 1 + 14 files changed, 653 insertions(+), 573 deletions(-) create mode 100644 src/conf/virdomainsnapshotobjlist.h create mode 100644 src/conf/virdomainsnapshotobjlist.c diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h index c816ad06e1..7230b9950f 100644 --- a/src/conf/snapshot_conf.h +++ b/src/conf/snapshot_conf.h @@ -24,7 +24,6 @@ # include "internal.h" # include "domain_conf.h" -# include "virdomainsnapshotobj.h" /* Items related to snapshot state */ @@ -94,10 +93,6 @@ struct _virDomainSnapshotDef { bool current; /* At most one snapshot in the list should have this set */ }; - -virDomainSnapshotObjListPtr virDomainSnapshotObjListNew(void); -void virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots); - typedef enum { VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE = 1 << 0, VIR_DOMAIN_SNAPSHOT_PARSE_DISKS = 1 << 1, @@ -121,13 +116,6 @@ virDomainSnapshotDefPtr virDomainSnapshotDefParseNode(xmlDocPtr xml, virCapsPtr caps, virDomainXMLOptionPtr xmlopt, unsigned int flags); -int virDomainSnapshotObjListParse(const char *xmlStr, - const unsigned char *domain_uuid, - virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr *current_snap, - virCapsPtr caps, - virDomainXMLOptionPtr xmlopt, - unsigned int flags); void virDomainSnapshotDefFree(virDomainSnapshotDefPtr def); char *virDomainSnapshotDefFormat(const char *uuidstr, virDomainSnapshotDefPtr def, @@ -141,34 +129,9 @@ int virDomainSnapshotDefFormatInternal(virBufferPtr buf, virDomainXMLOptionPtr xmlopt, unsigned int flags); -int virDomainSnapshotObjListFormat(virBufferPtr buf, - const char *uuidstr, - virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr current_snapshot, - virCapsPtr caps, - virDomainXMLOptionPtr xmlopt, - unsigned int flags); int virDomainSnapshotAlignDisks(virDomainSnapshotDefPtr snapshot, int default_snapshot, bool require_match); -virDomainSnapshotObjPtr virDomainSnapshotAssignDef(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotDefPtr def); - -int virDomainSnapshotObjListGetNames(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr from, - char **const names, int maxnames, - unsigned int flags); -int virDomainSnapshotObjListNum(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr from, - unsigned int flags); -virDomainSnapshotObjPtr virDomainSnapshotFindByName(virDomainSnapshotObjListPtr snapshots, - const char *name); -void virDomainSnapshotObjListRemove(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr snapshot); -int virDomainSnapshotForEach(virDomainSnapshotObjListPtr snapshots, - virHashIterator iter, - void *data); -int virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots); # define VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA \ (VIR_DOMAIN_SNAPSHOT_LIST_METADATA | \ @@ -193,12 +156,6 @@ int virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots); VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS | \ VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION) -int virDomainListSnapshots(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr from, - virDomainPtr dom, - virDomainSnapshotPtr **snaps, - unsigned int flags); - bool virDomainSnapshotDefIsExternal(virDomainSnapshotDefPtr def); bool virDomainSnapshotIsExternal(virDomainSnapshotObjPtr snap); diff --git a/src/conf/virdomainsnapshotobjlist.h b/src/conf/virdomainsnapshotobjlist.h new file mode 100644 index 0000000000..ae4799c025 --- /dev/null +++ b/src/conf/virdomainsnapshotobjlist.h @@ -0,0 +1,74 @@ +/* + * virdomainsnapshotobjlist.h: handle a tree of snapshot objects + * (derived from snapshot_conf.h) + * + * Copyright (C) 2006-2019 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#ifndef LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H +# define LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H + +# include "internal.h" +# include "virdomainsnapshotobj.h" +# include "capabilities.h" +# include "virbuffer.h" + +virDomainSnapshotObjListPtr virDomainSnapshotObjListNew(void); +void virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots); + +int virDomainSnapshotObjListParse(const char *xmlStr, + const unsigned char *domain_uuid, + virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr *current_snap, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt, + unsigned int flags); +int virDomainSnapshotObjListFormat(virBufferPtr buf, + const char *uuidstr, + virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr current_snapshot, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt, + unsigned int flags); + +virDomainSnapshotObjPtr virDomainSnapshotAssignDef(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotDefPtr def); + +int virDomainSnapshotObjListGetNames(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr from, + char **const names, int maxnames, + unsigned int flags); +int virDomainSnapshotObjListNum(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr from, + unsigned int flags); +virDomainSnapshotObjPtr virDomainSnapshotFindByName(virDomainSnapshotObjListPtr snapshots, + const char *name); +void virDomainSnapshotObjListRemove(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr snapshot); +int virDomainSnapshotForEach(virDomainSnapshotObjListPtr snapshots, + virHashIterator iter, + void *data); +int virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots); + +int virDomainListSnapshots(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr from, + virDomainPtr dom, + virDomainSnapshotPtr **snaps, + unsigned int flags); + +#endif /* LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H */ diff --git a/src/conf/Makefile.inc.am b/src/conf/Makefile.inc.am index be941ee7e2..9b4d80485b 100644 --- a/src/conf/Makefile.inc.am +++ b/src/conf/Makefile.inc.am @@ -31,6 +31,8 @@ DOMAIN_CONF_SOURCES = \ conf/virdomainobjlist.h \ conf/virdomainsnapshotobj.c \ conf/virdomainsnapshotobj.h \ + conf/virdomainsnapshotobjlist.c \ + conf/virdomainsnapshotobjlist.h \ $(NULL) OBJECT_EVENT_SOURCES = \ diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 114d7edf4f..504c24b545 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -57,6 +57,7 @@ #include "virnetdevmacvlan.h" #include "virhostdev.h" #include "virmdev.h" +#include "virdomainsnapshotobjlist.h" #define VIR_FROM_THIS VIR_FROM_DOMAIN diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 560150977b..ffb1313c89 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -45,6 +45,7 @@ #include "virerror.h" #include "virxml.h" #include "virstring.h" +#include "virdomainsnapshotobjlist.h" #define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT @@ -70,14 +71,6 @@ VIR_ENUM_IMPL(virDomainSnapshotState, VIR_DOMAIN_SNAPSHOT_LAST, "disk-snapshot", ); -struct _virDomainSnapshotObjList { - /* name string -> virDomainSnapshotObj mapping - * for O(1), lockless lookup-by-name */ - virHashTable *objs; - - virDomainSnapshotObj metaroot; /* Special parent of all root snapshots */ -}; - /* Snapshot Def functions */ static void virDomainSnapshotDiskDefClear(virDomainSnapshotDiskDefPtr disk) @@ -507,116 +500,6 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDefPtr def, } -/* Parse a <snapshots> XML entry into snapshots, which must start empty. - * Any <domain> sub-elements of a <domainsnapshot> must match domain_uuid. - */ -int -virDomainSnapshotObjListParse(const char *xmlStr, - const unsigned char *domain_uuid, - virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr *current_snap, - virCapsPtr caps, - virDomainXMLOptionPtr xmlopt, - unsigned int flags) -{ - int ret = -1; - xmlDocPtr xml; - xmlNodePtr root; - xmlXPathContextPtr ctxt = NULL; - int n; - size_t i; - int keepBlanksDefault = xmlKeepBlanksDefault(0); - VIR_AUTOFREE(xmlNodePtr *) nodes = NULL; - VIR_AUTOFREE(char *) current = NULL; - - if (!(flags & VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE) || - (flags & VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL)) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("incorrect flags for bulk parse")); - return -1; - } - if (snapshots->metaroot.nchildren || *current_snap) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("bulk define of snapshots only possible with " - "no existing snapshot")); - return -1; - } - - if (!(xml = virXMLParse(NULL, xmlStr, _("(domain_snapshot)")))) - return -1; - - root = xmlDocGetRootElement(xml); - if (!virXMLNodeNameEqual(root, "snapshots")) { - virReportError(VIR_ERR_XML_ERROR, - _("unexpected root element <%s>, " - "expecting <snapshots>"), root->name); - goto cleanup; - } - ctxt = xmlXPathNewContext(xml); - if (ctxt == NULL) { - virReportOOMError(); - goto cleanup; - } - ctxt->node = root; - current = virXMLPropString(root, "current"); - - if ((n = virXPathNodeSet("./domainsnapshot", ctxt, &nodes)) < 0) - goto cleanup; - if (!n) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("expected at least one <domainsnapshot> child")); - goto cleanup; - } - - for (i = 0; i < n; i++) { - virDomainSnapshotDefPtr def; - virDomainSnapshotObjPtr snap; - - def = virDomainSnapshotDefParseNode(xml, nodes[i], caps, xmlopt, flags); - if (!def) - goto cleanup; - if (!(snap = virDomainSnapshotAssignDef(snapshots, def))) { - virDomainSnapshotDefFree(def); - goto cleanup; - } - if (virDomainSnapshotRedefineValidate(def, domain_uuid, NULL, NULL, - flags) < 0) - goto cleanup; - } - - if (virDomainSnapshotUpdateRelations(snapshots) < 0) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("<snapshots> contains inconsistent parent-child " - "relationships")); - goto cleanup; - } - - if (current) { - if (!(*current_snap = virDomainSnapshotFindByName(snapshots, - current))) { - virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("no snapshot matching current='%s'"), current); - goto cleanup; - } - (*current_snap)->def->current = true; - } - - ret = 0; - cleanup: - if (ret < 0) { - /* There were no snapshots before this call; so on error, just - * blindly delete anything created before the failure. */ - virHashRemoveAll(snapshots->objs); - snapshots->metaroot.nchildren = 0; - snapshots->metaroot.first_child = NULL; - } - xmlXPathFreeContext(ctxt); - xmlFreeDoc(xml); - xmlKeepBlanksDefault(keepBlanksDefault); - return ret; -} - - /** * virDomainSnapshotDefAssignExternalNames: * @def: snapshot def object @@ -1001,406 +884,6 @@ virDomainSnapshotDefFormat(const char *uuidstr, } -/* Struct and callback function used as a hash table callback; each call - * appends another snapshot XML to buf, with the caller clearing the - * buffer if any callback fails. */ -struct virDomainSnapshotFormatData { - virBufferPtr buf; - const char *uuidstr; - virCapsPtr caps; - virDomainXMLOptionPtr xmlopt; - unsigned int flags; -}; - -static int -virDomainSnapshotFormatOne(void *payload, - const void *name ATTRIBUTE_UNUSED, - void *opaque) -{ - virDomainSnapshotObjPtr snap = payload; - struct virDomainSnapshotFormatData *data = opaque; - return virDomainSnapshotDefFormatInternal(data->buf, data->uuidstr, - snap->def, data->caps, - data->xmlopt, data->flags); -} - - -/* Format the XML for all snapshots in the list into buf. On error, - * clear the buffer and return -1. */ -int -virDomainSnapshotObjListFormat(virBufferPtr buf, - const char *uuidstr, - virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr current_snapshot, - virCapsPtr caps, - virDomainXMLOptionPtr xmlopt, - unsigned int flags) -{ - struct virDomainSnapshotFormatData data = { - .buf = buf, - .uuidstr = uuidstr, - .caps = caps, - .xmlopt = xmlopt, - .flags = flags, - }; - - virBufferAddLit(buf, "<snapshots"); - if (current_snapshot) - virBufferEscapeString(buf, " current='%s'", - current_snapshot->def->name); - virBufferAddLit(buf, ">\n"); - virBufferAdjustIndent(buf, 2); - if (virDomainSnapshotForEach(snapshots, virDomainSnapshotFormatOne, - &data) < 0) { - virBufferFreeAndReset(buf); - return -1; - } - virBufferAdjustIndent(buf, -2); - virBufferAddLit(buf, "</snapshots>\n"); - return 0; -} - - -/* Snapshot Obj functions */ -static virDomainSnapshotObjPtr virDomainSnapshotObjNew(void) -{ - virDomainSnapshotObjPtr snapshot; - - if (VIR_ALLOC(snapshot) < 0) - return NULL; - - VIR_DEBUG("obj=%p", snapshot); - - return snapshot; -} - -static void virDomainSnapshotObjFree(virDomainSnapshotObjPtr snapshot) -{ - if (!snapshot) - return; - - VIR_DEBUG("obj=%p", snapshot); - - virDomainSnapshotDefFree(snapshot->def); - VIR_FREE(snapshot); -} - -virDomainSnapshotObjPtr virDomainSnapshotAssignDef(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotDefPtr def) -{ - virDomainSnapshotObjPtr snap; - - if (virHashLookup(snapshots->objs, def->name) != NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected domain snapshot %s already exists"), - def->name); - return NULL; - } - - if (!(snap = virDomainSnapshotObjNew())) - return NULL; - snap->def = def; - - if (virHashAddEntry(snapshots->objs, snap->def->name, snap) < 0) { - VIR_FREE(snap); - return NULL; - } - - return snap; -} - -/* Snapshot Obj List functions */ -static void -virDomainSnapshotObjListDataFree(void *payload, - const void *name ATTRIBUTE_UNUSED) -{ - virDomainSnapshotObjPtr obj = payload; - - virDomainSnapshotObjFree(obj); -} - -virDomainSnapshotObjListPtr -virDomainSnapshotObjListNew(void) -{ - virDomainSnapshotObjListPtr snapshots; - if (VIR_ALLOC(snapshots) < 0) - return NULL; - snapshots->objs = virHashCreate(50, virDomainSnapshotObjListDataFree); - if (!snapshots->objs) { - VIR_FREE(snapshots); - return NULL; - } - return snapshots; -} - -void -virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots) -{ - if (!snapshots) - return; - virHashFree(snapshots->objs); - VIR_FREE(snapshots); -} - -struct virDomainSnapshotNameData { - char **const names; - int maxnames; - unsigned int flags; - int count; - bool error; -}; - -static int virDomainSnapshotObjListCopyNames(void *payload, - const void *name ATTRIBUTE_UNUSED, - void *opaque) -{ - virDomainSnapshotObjPtr obj = payload; - struct virDomainSnapshotNameData *data = opaque; - - if (data->error) - return 0; - /* Caller already sanitized flags. Filtering on DESCENDANTS was - * done by choice of iteration in the caller. */ - if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_LEAVES) && obj->nchildren) - return 0; - if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES) && !obj->nchildren) - return 0; - - if (data->flags & VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS) { - if (!(data->flags & VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE) && - obj->def->state == VIR_DOMAIN_SNAPSHOT_SHUTOFF) - return 0; - if (!(data->flags & VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY) && - obj->def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) - return 0; - if (!(data->flags & VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE) && - obj->def->state != VIR_DOMAIN_SNAPSHOT_SHUTOFF && - obj->def->state != VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) - return 0; - } - - if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL) && - virDomainSnapshotIsExternal(obj)) - return 0; - if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL) && - !virDomainSnapshotIsExternal(obj)) - return 0; - - if (data->names && data->count < data->maxnames && - VIR_STRDUP(data->names[data->count], obj->def->name) < 0) { - data->error = true; - return 0; - } - data->count++; - return 0; -} - -int -virDomainSnapshotObjListGetNames(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr from, - char **const names, int maxnames, - unsigned int flags) -{ - struct virDomainSnapshotNameData data = { names, maxnames, flags, 0, - false }; - size_t i; - - if (!from) { - /* LIST_ROOTS and LIST_DESCENDANTS have the same bit value, - * but opposite semantics. Toggle here to get the correct - * traversal on the metaroot. */ - flags ^= VIR_DOMAIN_SNAPSHOT_LIST_ROOTS; - from = &snapshots->metaroot; - } - - /* We handle LIST_ROOT/LIST_DESCENDANTS and LIST_TOPOLOGICAL directly, - * mask those bits out to determine when we must use the filter callback. */ - data.flags &= ~(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS | - VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL); - - /* If this common code is being used, we assume that all snapshots - * have metadata, and thus can handle METADATA up front as an - * all-or-none filter. XXX This might not always be true, if we - * add the ability to track qcow2 internal snapshots without the - * use of metadata. */ - if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA) == - VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA) - return 0; - data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA; - - /* For ease of coding the visitor, it is easier to zero each group - * where all of the bits are set. */ - if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES) == - VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES) - data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES; - if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS) == - VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS) - data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS; - if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION) == - VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION) - data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION; - - if (flags & VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS) { - /* We could just always do a topological visit; but it is - * possible to optimize for less stack usage and time when a - * simpler full hashtable visit or counter will do. */ - if (from->def || (names && - (flags & VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL))) - virDomainSnapshotForEachDescendant(from, - virDomainSnapshotObjListCopyNames, - &data); - else if (names || data.flags) - virHashForEach(snapshots->objs, virDomainSnapshotObjListCopyNames, - &data); - else - data.count = virHashSize(snapshots->objs); - } else if (names || data.flags) { - virDomainSnapshotForEachChild(from, - virDomainSnapshotObjListCopyNames, &data); - } else { - data.count = from->nchildren; - } - - if (data.error) { - for (i = 0; i < data.count; i++) - VIR_FREE(names[i]); - return -1; - } - - return data.count; -} - -int -virDomainSnapshotObjListNum(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr from, - unsigned int flags) -{ - return virDomainSnapshotObjListGetNames(snapshots, from, NULL, 0, flags); -} - -virDomainSnapshotObjPtr -virDomainSnapshotFindByName(virDomainSnapshotObjListPtr snapshots, - const char *name) -{ - return name ? virHashLookup(snapshots->objs, name) : &snapshots->metaroot; -} - -void virDomainSnapshotObjListRemove(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr snapshot) -{ - virHashRemoveEntry(snapshots->objs, snapshot->def->name); -} - -int -virDomainSnapshotForEach(virDomainSnapshotObjListPtr snapshots, - virHashIterator iter, - void *data) -{ - return virHashForEach(snapshots->objs, iter, data); -} - - -/* Struct and callback function used as a hash table callback; each call - * inspects the pre-existing snapshot->def->parent field, and adjusts - * the snapshot->parent field as well as the parent's child fields to - * wire up the hierarchical relations for the given snapshot. The error - * indicator gets set if a parent is missing or a requested parent would - * cause a circular parent chain. */ -struct snapshot_set_relation { - virDomainSnapshotObjListPtr snapshots; - int err; -}; -static int -virDomainSnapshotSetRelations(void *payload, - const void *name ATTRIBUTE_UNUSED, - void *data) -{ - virDomainSnapshotObjPtr obj = payload; - struct snapshot_set_relation *curr = data; - virDomainSnapshotObjPtr tmp; - - obj->parent = virDomainSnapshotFindByName(curr->snapshots, - obj->def->parent); - if (!obj->parent) { - curr->err = -1; - obj->parent = &curr->snapshots->metaroot; - VIR_WARN("snapshot %s lacks parent", obj->def->name); - } else { - tmp = obj->parent; - while (tmp && tmp->def) { - if (tmp == obj) { - curr->err = -1; - obj->parent = &curr->snapshots->metaroot; - VIR_WARN("snapshot %s in circular chain", obj->def->name); - break; - } - tmp = tmp->parent; - } - } - obj->parent->nchildren++; - obj->sibling = obj->parent->first_child; - obj->parent->first_child = obj; - return 0; -} - -/* Populate parent link and child count of all snapshots, with all - * assigned defs having relations starting as 0/NULL. Return 0 on - * success, -1 if a parent is missing or if a circular relationship - * was requested. */ -int -virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots) -{ - struct snapshot_set_relation act = { snapshots, 0 }; - - snapshots->metaroot.nchildren = 0; - snapshots->metaroot.first_child = NULL; - virHashForEach(snapshots->objs, virDomainSnapshotSetRelations, &act); - return act.err; -} - - -int -virDomainListSnapshots(virDomainSnapshotObjListPtr snapshots, - virDomainSnapshotObjPtr from, - virDomainPtr dom, - virDomainSnapshotPtr **snaps, - unsigned int flags) -{ - int count = virDomainSnapshotObjListNum(snapshots, from, flags); - virDomainSnapshotPtr *list = NULL; - char **names; - int ret = -1; - size_t i; - - if (!snaps || count < 0) - return count; - if (VIR_ALLOC_N(names, count) < 0 || - VIR_ALLOC_N(list, count + 1) < 0) - goto cleanup; - - if (virDomainSnapshotObjListGetNames(snapshots, from, names, count, - flags) < 0) - goto cleanup; - for (i = 0; i < count; i++) - if ((list[i] = virGetDomainSnapshot(dom, names[i])) == NULL) - goto cleanup; - - ret = count; - *snaps = list; - - cleanup: - for (i = 0; i < count; i++) - VIR_FREE(names[i]); - VIR_FREE(names); - if (ret < 0 && list) { - for (i = 0; i < count; i++) - virObjectUnref(list[i]); - VIR_FREE(list); - } - return ret; -} - - bool virDomainSnapshotDefIsExternal(virDomainSnapshotDefPtr def) { diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c index 7742de94f2..a814fc10a3 100644 --- a/src/conf/virdomainobjlist.c +++ b/src/conf/virdomainobjlist.c @@ -30,6 +30,7 @@ #include "virfile.h" #include "virlog.h" #include "virstring.h" +#include "virdomainsnapshotobjlist.h" #define VIR_FROM_THIS VIR_FROM_DOMAIN diff --git a/src/conf/virdomainsnapshotobj.c b/src/conf/virdomainsnapshotobj.c index 487f0cc702..7f92ac21d9 100644 --- a/src/conf/virdomainsnapshotobj.c +++ b/src/conf/virdomainsnapshotobj.c @@ -25,6 +25,7 @@ #include "internal.h" #include "virdomainsnapshotobj.h" #include "snapshot_conf.h" +#include "virdomainsnapshotobjlist.h" #include "virlog.h" #include "virerror.h" diff --git a/src/conf/virdomainsnapshotobjlist.c b/src/conf/virdomainsnapshotobjlist.c new file mode 100644 index 0000000000..e2f2110108 --- /dev/null +++ b/src/conf/virdomainsnapshotobjlist.c @@ -0,0 +1,553 @@ +/* + * virdomainsnapshotobjlist.c: handle a tree of snapshot objects + * (derived from snapshot_conf.c) + * + * Copyright (C) 2006-2019 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#include <config.h> + +#include "internal.h" +#include "virdomainsnapshotobjlist.h" +#include "snapshot_conf.h" +#include "virlog.h" +#include "virerror.h" +#include "datatypes.h" +#include "virstring.h" + +#define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT + +VIR_LOG_INIT("conf.virdomainsnapshotobjlist"); + +struct _virDomainSnapshotObjList { + /* name string -> virDomainSnapshotObj mapping + * for O(1), lockless lookup-by-name */ + virHashTable *objs; + + virDomainSnapshotObj metaroot; /* Special parent of all root snapshots */ +}; + + +/* Parse a <snapshots> XML entry into snapshots, which must start empty. + * Any <domain> sub-elements of a <domainsnapshot> must match domain_uuid. + */ +int +virDomainSnapshotObjListParse(const char *xmlStr, + const unsigned char *domain_uuid, + virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr *current_snap, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt, + unsigned int flags) +{ + int ret = -1; + xmlDocPtr xml; + xmlNodePtr root; + xmlXPathContextPtr ctxt = NULL; + int n; + size_t i; + int keepBlanksDefault = xmlKeepBlanksDefault(0); + VIR_AUTOFREE(xmlNodePtr *) nodes = NULL; + VIR_AUTOFREE(char *) current = NULL; + + if (!(flags & VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE) || + (flags & VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL)) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("incorrect flags for bulk parse")); + return -1; + } + if (snapshots->metaroot.nchildren || *current_snap) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("bulk define of snapshots only possible with " + "no existing snapshot")); + return -1; + } + + if (!(xml = virXMLParse(NULL, xmlStr, _("(domain_snapshot)")))) + return -1; + + root = xmlDocGetRootElement(xml); + if (!virXMLNodeNameEqual(root, "snapshots")) { + virReportError(VIR_ERR_XML_ERROR, + _("unexpected root element <%s>, " + "expecting <snapshots>"), root->name); + goto cleanup; + } + ctxt = xmlXPathNewContext(xml); + if (ctxt == NULL) { + virReportOOMError(); + goto cleanup; + } + ctxt->node = root; + current = virXMLPropString(root, "current"); + + if ((n = virXPathNodeSet("./domainsnapshot", ctxt, &nodes)) < 0) + goto cleanup; + if (!n) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("expected at least one <domainsnapshot> child")); + goto cleanup; + } + + for (i = 0; i < n; i++) { + virDomainSnapshotDefPtr def; + virDomainSnapshotObjPtr snap; + + def = virDomainSnapshotDefParseNode(xml, nodes[i], caps, xmlopt, flags); + if (!def) + goto cleanup; + if (!(snap = virDomainSnapshotAssignDef(snapshots, def))) { + virDomainSnapshotDefFree(def); + goto cleanup; + } + if (virDomainSnapshotRedefineValidate(def, domain_uuid, NULL, NULL, + flags) < 0) + goto cleanup; + } + + if (virDomainSnapshotUpdateRelations(snapshots) < 0) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("<snapshots> contains inconsistent parent-child " + "relationships")); + goto cleanup; + } + + if (current) { + if (!(*current_snap = virDomainSnapshotFindByName(snapshots, + current))) { + virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, + _("no snapshot matching current='%s'"), current); + goto cleanup; + } + (*current_snap)->def->current = true; + } + + ret = 0; + cleanup: + if (ret < 0) { + /* There were no snapshots before this call; so on error, just + * blindly delete anything created before the failure. */ + virHashRemoveAll(snapshots->objs); + snapshots->metaroot.nchildren = 0; + snapshots->metaroot.first_child = NULL; + } + xmlXPathFreeContext(ctxt); + xmlFreeDoc(xml); + xmlKeepBlanksDefault(keepBlanksDefault); + return ret; +} + + +/* Struct and callback function used as a hash table callback; each call + * appends another snapshot XML to buf, with the caller clearing the + * buffer if any callback fails. */ +struct virDomainSnapshotFormatData { + virBufferPtr buf; + const char *uuidstr; + virCapsPtr caps; + virDomainXMLOptionPtr xmlopt; + unsigned int flags; +}; + +static int +virDomainSnapshotFormatOne(void *payload, + const void *name ATTRIBUTE_UNUSED, + void *opaque) +{ + virDomainSnapshotObjPtr snap = payload; + struct virDomainSnapshotFormatData *data = opaque; + return virDomainSnapshotDefFormatInternal(data->buf, data->uuidstr, + snap->def, data->caps, + data->xmlopt, data->flags); +} + + +/* Format the XML for all snapshots in the list into buf. On error, + * clear the buffer and return -1. */ +int +virDomainSnapshotObjListFormat(virBufferPtr buf, + const char *uuidstr, + virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr current_snapshot, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt, + unsigned int flags) +{ + struct virDomainSnapshotFormatData data = { + .buf = buf, + .uuidstr = uuidstr, + .caps = caps, + .xmlopt = xmlopt, + .flags = flags, + }; + + virBufferAddLit(buf, "<snapshots"); + if (current_snapshot) + virBufferEscapeString(buf, " current='%s'", + current_snapshot->def->name); + virBufferAddLit(buf, ">\n"); + virBufferAdjustIndent(buf, 2); + if (virDomainSnapshotForEach(snapshots, virDomainSnapshotFormatOne, + &data) < 0) { + virBufferFreeAndReset(buf); + return -1; + } + virBufferAdjustIndent(buf, -2); + virBufferAddLit(buf, "</snapshots>\n"); + return 0; +} + + +/* Snapshot Obj functions */ +static virDomainSnapshotObjPtr virDomainSnapshotObjNew(void) +{ + virDomainSnapshotObjPtr snapshot; + + if (VIR_ALLOC(snapshot) < 0) + return NULL; + + VIR_DEBUG("obj=%p", snapshot); + + return snapshot; +} + +static void virDomainSnapshotObjFree(virDomainSnapshotObjPtr snapshot) +{ + if (!snapshot) + return; + + VIR_DEBUG("obj=%p", snapshot); + + virDomainSnapshotDefFree(snapshot->def); + VIR_FREE(snapshot); +} + +virDomainSnapshotObjPtr virDomainSnapshotAssignDef(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotDefPtr def) +{ + virDomainSnapshotObjPtr snap; + + if (virHashLookup(snapshots->objs, def->name) != NULL) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unexpected domain snapshot %s already exists"), + def->name); + return NULL; + } + + if (!(snap = virDomainSnapshotObjNew())) + return NULL; + snap->def = def; + + if (virHashAddEntry(snapshots->objs, snap->def->name, snap) < 0) { + VIR_FREE(snap); + return NULL; + } + + return snap; +} + +/* Snapshot Obj List functions */ +static void +virDomainSnapshotObjListDataFree(void *payload, + const void *name ATTRIBUTE_UNUSED) +{ + virDomainSnapshotObjPtr obj = payload; + + virDomainSnapshotObjFree(obj); +} + +virDomainSnapshotObjListPtr +virDomainSnapshotObjListNew(void) +{ + virDomainSnapshotObjListPtr snapshots; + if (VIR_ALLOC(snapshots) < 0) + return NULL; + snapshots->objs = virHashCreate(50, virDomainSnapshotObjListDataFree); + if (!snapshots->objs) { + VIR_FREE(snapshots); + return NULL; + } + return snapshots; +} + +void +virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots) +{ + if (!snapshots) + return; + virHashFree(snapshots->objs); + VIR_FREE(snapshots); +} + +struct virDomainSnapshotNameData { + char **const names; + int maxnames; + unsigned int flags; + int count; + bool error; +}; + +static int virDomainSnapshotObjListCopyNames(void *payload, + const void *name ATTRIBUTE_UNUSED, + void *opaque) +{ + virDomainSnapshotObjPtr obj = payload; + struct virDomainSnapshotNameData *data = opaque; + + if (data->error) + return 0; + /* Caller already sanitized flags. Filtering on DESCENDANTS was + * done by choice of iteration in the caller. */ + if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_LEAVES) && obj->nchildren) + return 0; + if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES) && !obj->nchildren) + return 0; + + if (data->flags & VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS) { + if (!(data->flags & VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE) && + obj->def->state == VIR_DOMAIN_SNAPSHOT_SHUTOFF) + return 0; + if (!(data->flags & VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY) && + obj->def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) + return 0; + if (!(data->flags & VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE) && + obj->def->state != VIR_DOMAIN_SNAPSHOT_SHUTOFF && + obj->def->state != VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) + return 0; + } + + if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL) && + virDomainSnapshotIsExternal(obj)) + return 0; + if ((data->flags & VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL) && + !virDomainSnapshotIsExternal(obj)) + return 0; + + if (data->names && data->count < data->maxnames && + VIR_STRDUP(data->names[data->count], obj->def->name) < 0) { + data->error = true; + return 0; + } + data->count++; + return 0; +} + +int +virDomainSnapshotObjListGetNames(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr from, + char **const names, int maxnames, + unsigned int flags) +{ + struct virDomainSnapshotNameData data = { names, maxnames, flags, 0, + false }; + size_t i; + + if (!from) { + /* LIST_ROOTS and LIST_DESCENDANTS have the same bit value, + * but opposite semantics. Toggle here to get the correct + * traversal on the metaroot. */ + flags ^= VIR_DOMAIN_SNAPSHOT_LIST_ROOTS; + from = &snapshots->metaroot; + } + + /* We handle LIST_ROOT/LIST_DESCENDANTS and LIST_TOPOLOGICAL directly, + * mask those bits out to determine when we must use the filter callback. */ + data.flags &= ~(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS | + VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL); + + /* If this common code is being used, we assume that all snapshots + * have metadata, and thus can handle METADATA up front as an + * all-or-none filter. XXX This might not always be true, if we + * add the ability to track qcow2 internal snapshots without the + * use of metadata. */ + if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA) == + VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA) + return 0; + data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA; + + /* For ease of coding the visitor, it is easier to zero each group + * where all of the bits are set. */ + if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES) == + VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES) + data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES; + if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS) == + VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS) + data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS; + if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION) == + VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION) + data.flags &= ~VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION; + + if (flags & VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS) { + /* We could just always do a topological visit; but it is + * possible to optimize for less stack usage and time when a + * simpler full hashtable visit or counter will do. */ + if (from->def || (names && + (flags & VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL))) + virDomainSnapshotForEachDescendant(from, + virDomainSnapshotObjListCopyNames, + &data); + else if (names || data.flags) + virHashForEach(snapshots->objs, virDomainSnapshotObjListCopyNames, + &data); + else + data.count = virHashSize(snapshots->objs); + } else if (names || data.flags) { + virDomainSnapshotForEachChild(from, + virDomainSnapshotObjListCopyNames, &data); + } else { + data.count = from->nchildren; + } + + if (data.error) { + for (i = 0; i < data.count; i++) + VIR_FREE(names[i]); + return -1; + } + + return data.count; +} + +int +virDomainSnapshotObjListNum(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr from, + unsigned int flags) +{ + return virDomainSnapshotObjListGetNames(snapshots, from, NULL, 0, flags); +} + +virDomainSnapshotObjPtr +virDomainSnapshotFindByName(virDomainSnapshotObjListPtr snapshots, + const char *name) +{ + return name ? virHashLookup(snapshots->objs, name) : &snapshots->metaroot; +} + +void virDomainSnapshotObjListRemove(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr snapshot) +{ + virHashRemoveEntry(snapshots->objs, snapshot->def->name); +} + +int +virDomainSnapshotForEach(virDomainSnapshotObjListPtr snapshots, + virHashIterator iter, + void *data) +{ + return virHashForEach(snapshots->objs, iter, data); +} + + +/* Struct and callback function used as a hash table callback; each call + * inspects the pre-existing snapshot->def->parent field, and adjusts + * the snapshot->parent field as well as the parent's child fields to + * wire up the hierarchical relations for the given snapshot. The error + * indicator gets set if a parent is missing or a requested parent would + * cause a circular parent chain. */ +struct snapshot_set_relation { + virDomainSnapshotObjListPtr snapshots; + int err; +}; +static int +virDomainSnapshotSetRelations(void *payload, + const void *name ATTRIBUTE_UNUSED, + void *data) +{ + virDomainSnapshotObjPtr obj = payload; + struct snapshot_set_relation *curr = data; + virDomainSnapshotObjPtr tmp; + + obj->parent = virDomainSnapshotFindByName(curr->snapshots, + obj->def->parent); + if (!obj->parent) { + curr->err = -1; + obj->parent = &curr->snapshots->metaroot; + VIR_WARN("snapshot %s lacks parent", obj->def->name); + } else { + tmp = obj->parent; + while (tmp && tmp->def) { + if (tmp == obj) { + curr->err = -1; + obj->parent = &curr->snapshots->metaroot; + VIR_WARN("snapshot %s in circular chain", obj->def->name); + break; + } + tmp = tmp->parent; + } + } + obj->parent->nchildren++; + obj->sibling = obj->parent->first_child; + obj->parent->first_child = obj; + return 0; +} + +/* Populate parent link and child count of all snapshots, with all + * assigned defs having relations starting as 0/NULL. Return 0 on + * success, -1 if a parent is missing or if a circular relationship + * was requested. */ +int +virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots) +{ + struct snapshot_set_relation act = { snapshots, 0 }; + + snapshots->metaroot.nchildren = 0; + snapshots->metaroot.first_child = NULL; + virHashForEach(snapshots->objs, virDomainSnapshotSetRelations, &act); + return act.err; +} + + +int +virDomainListSnapshots(virDomainSnapshotObjListPtr snapshots, + virDomainSnapshotObjPtr from, + virDomainPtr dom, + virDomainSnapshotPtr **snaps, + unsigned int flags) +{ + int count = virDomainSnapshotObjListNum(snapshots, from, flags); + virDomainSnapshotPtr *list = NULL; + char **names; + int ret = -1; + size_t i; + + if (!snaps || count < 0) + return count; + if (VIR_ALLOC_N(names, count) < 0 || + VIR_ALLOC_N(list, count + 1) < 0) + goto cleanup; + + if (virDomainSnapshotObjListGetNames(snapshots, from, names, count, + flags) < 0) + goto cleanup; + for (i = 0; i < count; i++) + if ((list[i] = virGetDomainSnapshot(dom, names[i])) == NULL) + goto cleanup; + + ret = count; + *snaps = list; + + cleanup: + for (i = 0; i < count; i++) + VIR_FREE(names[i]); + VIR_FREE(names); + if (ret < 0 && list) { + for (i = 0; i < count; i++) + virObjectUnref(list[i]); + VIR_FREE(list); + } + return ret; +} diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index d775fe8551..758ec9f102 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -883,30 +883,18 @@ virSecretEventValueChangedNew; # conf/snapshot_conf.h -virDomainListSnapshots; virDomainSnapshotAlignDisks; -virDomainSnapshotAssignDef; virDomainSnapshotDefFormat; virDomainSnapshotDefFree; virDomainSnapshotDefIsExternal; virDomainSnapshotDefParseString; -virDomainSnapshotFindByName; -virDomainSnapshotForEach; virDomainSnapshotFormatConvertXMLFlags; virDomainSnapshotIsExternal; virDomainSnapshotLocationTypeFromString; virDomainSnapshotLocationTypeToString; -virDomainSnapshotObjListFormat; -virDomainSnapshotObjListFree; -virDomainSnapshotObjListGetNames; -virDomainSnapshotObjListNew; -virDomainSnapshotObjListNum; -virDomainSnapshotObjListParse; -virDomainSnapshotObjListRemove; virDomainSnapshotRedefinePrep; virDomainSnapshotStateTypeFromString; virDomainSnapshotStateTypeToString; -virDomainSnapshotUpdateRelations; # conf/storage_adapter_conf.h @@ -995,6 +983,21 @@ virDomainSnapshotForEachChild; virDomainSnapshotForEachDescendant; +# conf/virdomainsnapshotobjlist.h +virDomainListSnapshots; +virDomainSnapshotAssignDef; +virDomainSnapshotFindByName; +virDomainSnapshotForEach; +virDomainSnapshotObjListFormat; +virDomainSnapshotObjListFree; +virDomainSnapshotObjListGetNames; +virDomainSnapshotObjListNew; +virDomainSnapshotObjListNum; +virDomainSnapshotObjListParse; +virDomainSnapshotObjListRemove; +virDomainSnapshotUpdateRelations; + + # conf/virinterfaceobj.h virInterfaceObjEndAPI; virInterfaceObjGetDef; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1b82b70cc1..d2525c289a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -58,6 +58,7 @@ #include "virnuma.h" #include "virgic.h" #include "virmdev.h" +#include "virdomainsnapshotobjlist.h" #if defined(__linux__) # include <linux/capability.h> #endif diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6a7a8e102b..86e80391e1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -55,6 +55,7 @@ #include "secret_util.h" #include "logging/log_manager.h" #include "locking/domain_lock.h" +#include "virdomainsnapshotobjlist.h" #ifdef MAJOR_IN_MKDEV # include <sys/mkdev.h> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e461fb51b0..75b5b26bca 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -101,6 +101,7 @@ #include "dirname.h" #include "netdev_bandwidth_conf.h" #include "virqemu.h" +#include "virdomainsnapshotobjlist.h" #define VIR_FROM_THIS VIR_FROM_QEMU diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 362b79e567..cb44081134 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -60,6 +60,7 @@ #include "virtypedparam.h" #include "virprocess.h" #include "nwfilter_conf.h" +#include "virdomainsnapshotobjlist.h" #define VIR_FROM_THIS VIR_FROM_QEMU diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 02cd4f4d07..4d49c987b5 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -63,6 +63,7 @@ #include "virdomainobjlist.h" #include "virinterfaceobj.h" #include "virhostcpu.h" +#include "virdomainsnapshotobjlist.h" #define VIR_FROM_THIS VIR_FROM_TEST -- 2.20.1
On Fri, Mar 15, 2019 at 12:02:30AM -0500, Eric Blake wrote:
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object list code into its own file, and update includes for affected clients.
This is just code motion, but done in preparation of sharing a lot of the object list code with checkpoints.
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/snapshot_conf.h | 43 --- src/conf/virdomainsnapshotobjlist.h | 74 ++++ src/conf/Makefile.inc.am | 2 + src/conf/domain_conf.c | 1 + src/conf/snapshot_conf.c | 519 +------------------------- src/conf/virdomainobjlist.c | 1 + src/conf/virdomainsnapshotobj.c | 1 + src/conf/virdomainsnapshotobjlist.c | 553 ++++++++++++++++++++++++++++ src/libvirt_private.syms | 27 +- src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c | 1 + src/qemu/qemu_driver.c | 1 + src/qemu/qemu_migration.c | 1 + src/test/test_driver.c | 1 + 14 files changed, 653 insertions(+), 573 deletions(-) create mode 100644 src/conf/virdomainsnapshotobjlist.h create mode 100644 src/conf/virdomainsnapshotobjlist.c
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
On 3/15/19 12:02 AM, Eric Blake wrote:
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object list code into its own file, and update includes for affected clients.
This is just code motion, but done in preparation of sharing a lot of the object list code with checkpoints.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
+++ b/src/conf/virdomainsnapshotobjlist.h @@ -0,0 +1,74 @@
+#ifndef LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H +# define LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H + +# include "internal.h" +# include "virdomainsnapshotobj.h" +# include "capabilities.h"
This one felt a bit unclean. I'll submit a patch 1.5/8 that moves the typedefs from capabilities.h int virconftypes.h, then fix 2/8 to sort those into place as well. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; the easiest way to share common code is to give both classes a common base class. If this were C++, we'd just use public member inheritance; but since it is C, we instead have to touch EVERY use of member fields that will be relocated. To avoid having to make future edits, wrap the majority of accesses behind static inline functions, so that we only have to touch one place when changing class inheritance; and temporarily rename the members to let the compiler ensure we caught all uses. Signed-off-by: Eric Blake <eblake@redhat.com> --- src/datatypes.h | 22 +++++++--- src/datatypes.c | 10 ++--- src/esx/esx_driver.c | 66 ++++++++++++++--------------- src/libvirt-domain-snapshot.c | 24 +++++------ src/qemu/qemu_driver.c | 40 ++++++++--------- src/remote/remote_daemon_dispatch.c | 4 +- src/remote/remote_driver.c | 4 +- src/rpc/gendispatch.pl | 2 +- src/test/test_driver.c | 20 ++++----- src/vbox/vbox_common.c | 56 ++++++++++++------------ src/vz/vz_driver.c | 52 +++++++++++------------ 11 files changed, 156 insertions(+), 144 deletions(-) diff --git a/src/datatypes.h b/src/datatypes.h index 12015679f3..dcba279bec 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -1,7 +1,7 @@ /* * datatypes.h: management of structs for public data types * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -296,8 +296,8 @@ extern virClassPtr virAdmClientClass; do { \ virDomainSnapshotPtr _snap = (obj); \ if (!virObjectIsClass(_snap, virDomainSnapshotClass) || \ - !virObjectIsClass(_snap->domain, virDomainClass) || \ - !virObjectIsClass(_snap->domain->conn, virConnectClass)) { \ + !virObjectIsClass(virSnapDom(_snap), virDomainClass) || \ + !virObjectIsClass(virSnapDom(_snap)->conn, virConnectClass)) { \ virReportErrorHelper(VIR_FROM_DOMAIN_SNAPSHOT, \ VIR_ERR_INVALID_DOMAIN_SNAPSHOT, \ __FILE__, __FUNCTION__, __LINE__, \ @@ -675,10 +675,22 @@ struct _virStream { */ struct _virDomainSnapshot { virObject parent; - char *name; - virDomainPtr domain; + char *_name; + virDomainPtr _domain; }; +static inline char * +virSnapName(virDomainSnapshotPtr snapshot) +{ + return snapshot->_name; +} + +static inline virDomainPtr +virSnapDom(virDomainSnapshotPtr snapshot) +{ + return snapshot->_domain; +} + /** * _virNWFilter: * diff --git a/src/datatypes.c b/src/datatypes.c index 9b92d892d5..916c259a6e 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -923,10 +923,10 @@ virGetDomainSnapshot(virDomainPtr domain, const char *name) if (!(ret = virObjectNew(virDomainSnapshotClass))) goto error; - if (VIR_STRDUP(ret->name, name) < 0) + if (VIR_STRDUP(ret->_name, name) < 0) goto error; - ret->domain = virObjectRef(domain); + ret->_domain = virObjectRef(domain); return ret; @@ -950,10 +950,10 @@ static void virDomainSnapshotDispose(void *obj) { virDomainSnapshotPtr snapshot = obj; - VIR_DEBUG("release snapshot %p %s", snapshot, snapshot->name); + VIR_DEBUG("release snapshot %p %s", snapshot, snapshot->_name); - VIR_FREE(snapshot->name); - virObjectUnref(snapshot->domain); + VIR_FREE(snapshot->_name); + virObjectUnref(snapshot->_domain); } diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index c6d112268f..c016f8051f 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -4166,7 +4166,7 @@ static char * esxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, unsigned int flags) { - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *rootSnapshotList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTreeParent = NULL; @@ -4181,15 +4181,15 @@ esxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (esxVI_EnsureSession(priv->primary) < 0) return NULL; - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotList, virSnapName(snapshot), &snapshotTree, &snapshotTreeParent, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; } - def.name = snapshot->name; + def.name = virSnapName(snapshot); def.description = snapshotTree->description; def.parent = snapshotTreeParent ? snapshotTreeParent->name : NULL; @@ -4201,7 +4201,7 @@ esxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, def.state = esxVI_VirtualMachinePowerState_ConvertToLibvirt (snapshotTree->state); - virUUIDFormat(snapshot->domain->uuid, uuid_string); + virUUIDFormat(virSnapDom(snapshot)->uuid, uuid_string); xml = virDomainSnapshotDefFormat(uuid_string, &def, priv->caps, priv->xmlopt, 0); @@ -4299,7 +4299,7 @@ static int esxDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, unsigned int flags) { int count = -1; - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *rootSnapshotTreeList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; bool recurse; @@ -4315,9 +4315,9 @@ esxDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, unsigned int flags) if (esxVI_EnsureSession(priv->primary) < 0) return -1; - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotTreeList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotTreeList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotTreeList, virSnapName(snapshot), &snapshotTree, NULL, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; @@ -4346,7 +4346,7 @@ esxDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, unsigned int flags) { int result = -1; - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *rootSnapshotTreeList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; bool recurse; @@ -4370,9 +4370,9 @@ esxDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, if (esxVI_EnsureSession(priv->primary) < 0) return -1; - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotTreeList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotTreeList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotTreeList, virSnapName(snapshot), &snapshotTree, NULL, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; @@ -4457,7 +4457,7 @@ esxDomainHasCurrentSnapshot(virDomainPtr domain, unsigned int flags) static virDomainSnapshotPtr esxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) { - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *rootSnapshotList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTreeParent = NULL; @@ -4468,9 +4468,9 @@ esxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) if (esxVI_EnsureSession(priv->primary) < 0) return NULL; - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotList, virSnapName(snapshot), &snapshotTree, &snapshotTreeParent, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; @@ -4483,7 +4483,7 @@ esxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) goto cleanup; } - parent = virGetDomainSnapshot(snapshot->domain, snapshotTreeParent->name); + parent = virGetDomainSnapshot(virSnapDom(snapshot), snapshotTreeParent->name); cleanup: esxVI_VirtualMachineSnapshotTree_Free(&rootSnapshotList); @@ -4522,7 +4522,7 @@ esxDomainSnapshotCurrent(virDomainPtr domain, unsigned int flags) static int esxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, unsigned int flags) { - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *currentSnapshotTree = NULL; esxVI_VirtualMachineSnapshotTree *rootSnapshotList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; @@ -4534,21 +4534,21 @@ esxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, unsigned int flags) return -1; /* Check that snapshot exists. */ - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotList, virSnapName(snapshot), &snapshotTree, NULL, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; } - if (esxVI_LookupCurrentSnapshotTree(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupCurrentSnapshotTree(priv->primary, virSnapDom(snapshot)->uuid, ¤tSnapshotTree, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; } - ret = STREQ(snapshot->name, currentSnapshotTree->name); + ret = STREQ(virSnapName(snapshot), currentSnapshotTree->name); cleanup: esxVI_VirtualMachineSnapshotTree_Free(¤tSnapshotTree); @@ -4560,7 +4560,7 @@ esxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, unsigned int flags) static int esxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, unsigned int flags) { - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *rootSnapshotList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; int ret = -1; @@ -4571,9 +4571,9 @@ esxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, unsigned int flags) return -1; /* Check that snapshot exists. If so, there is no metadata. */ - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotList, virSnapName(snapshot), &snapshotTree, NULL, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; @@ -4591,7 +4591,7 @@ static int esxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) { int result = -1; - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *rootSnapshotList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; esxVI_ManagedObjectReference *task = NULL; @@ -4603,9 +4603,9 @@ esxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) if (esxVI_EnsureSession(priv->primary) < 0) return -1; - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotList, virSnapName(snapshot), &snapshotTree, NULL, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; @@ -4613,7 +4613,7 @@ esxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) if (esxVI_RevertToSnapshot_Task(priv->primary, snapshotTree->snapshot, NULL, esxVI_Boolean_Undefined, &task) < 0 || - esxVI_WaitForTaskCompletion(priv->primary, task, snapshot->domain->uuid, + esxVI_WaitForTaskCompletion(priv->primary, task, virSnapDom(snapshot)->uuid, esxVI_Occurrence_RequiredItem, priv->parsedUri->autoAnswer, &taskInfoState, &taskInfoErrorMessage) < 0) { @@ -4622,7 +4622,7 @@ esxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) if (taskInfoState != esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not revert to snapshot '%s': %s"), snapshot->name, + _("Could not revert to snapshot '%s': %s"), virSnapName(snapshot), taskInfoErrorMessage); goto cleanup; } @@ -4643,7 +4643,7 @@ static int esxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) { int result = -1; - esxPrivate *priv = snapshot->domain->conn->privateData; + esxPrivate *priv = virSnapDom(snapshot)->conn->privateData; esxVI_VirtualMachineSnapshotTree *rootSnapshotList = NULL; esxVI_VirtualMachineSnapshotTree *snapshotTree = NULL; esxVI_Boolean removeChildren = esxVI_Boolean_False; @@ -4660,9 +4660,9 @@ esxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) if (flags & VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN) removeChildren = esxVI_Boolean_True; - if (esxVI_LookupRootSnapshotTreeList(priv->primary, snapshot->domain->uuid, + if (esxVI_LookupRootSnapshotTreeList(priv->primary, virSnapDom(snapshot)->uuid, &rootSnapshotList) < 0 || - esxVI_GetSnapshotTreeByName(rootSnapshotList, snapshot->name, + esxVI_GetSnapshotTreeByName(rootSnapshotList, virSnapName(snapshot), &snapshotTree, NULL, esxVI_Occurrence_RequiredItem) < 0) { goto cleanup; @@ -4677,7 +4677,7 @@ esxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) if (esxVI_RemoveSnapshot_Task(priv->primary, snapshotTree->snapshot, removeChildren, &task) < 0 || - esxVI_WaitForTaskCompletion(priv->primary, task, snapshot->domain->uuid, + esxVI_WaitForTaskCompletion(priv->primary, task, virSnapDom(snapshot)->uuid, esxVI_Occurrence_RequiredItem, priv->parsedUri->autoAnswer, &taskInfoState, &taskInfoErrorMessage) < 0) { @@ -4686,7 +4686,7 @@ esxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) if (taskInfoState != esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not delete snapshot '%s': %s"), snapshot->name, + _("Could not delete snapshot '%s': %s"), virSnapName(snapshot), taskInfoErrorMessage); goto cleanup; } diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c index be9bf71af9..e1275c69b0 100644 --- a/src/libvirt-domain-snapshot.c +++ b/src/libvirt-domain-snapshot.c @@ -45,7 +45,7 @@ virDomainSnapshotGetName(virDomainSnapshotPtr snapshot) virCheckDomainSnapshotReturn(snapshot, NULL); - return snapshot->name; + return virSnapName(snapshot); } @@ -68,7 +68,7 @@ virDomainSnapshotGetDomain(virDomainSnapshotPtr snapshot) virCheckDomainSnapshotReturn(snapshot, NULL); - return snapshot->domain; + return virSnapDom(snapshot); } @@ -91,7 +91,7 @@ virDomainSnapshotGetConnect(virDomainSnapshotPtr snapshot) virCheckDomainSnapshotReturn(snapshot, NULL); - return snapshot->domain->conn; + return virSnapDom(snapshot)->conn; } @@ -273,7 +273,7 @@ virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, virResetLastError(); virCheckDomainSnapshotReturn(snapshot, NULL); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; if ((conn->flags & VIR_CONNECT_RO) && (flags & VIR_DOMAIN_SNAPSHOT_XML_SECURE)) { @@ -606,7 +606,7 @@ virDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, unsigned int flags) virResetLastError(); virCheckDomainSnapshotReturn(snapshot, -1); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; if (conn->driver->domainSnapshotNumChildren) { int ret = conn->driver->domainSnapshotNumChildren(snapshot, flags); @@ -700,7 +700,7 @@ virDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, virResetLastError(); virCheckDomainSnapshotReturn(snapshot, -1); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; virCheckNonNullArgGoto(names, error); virCheckNonNegativeArgGoto(nameslen, error); @@ -796,7 +796,7 @@ virDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, *snaps = NULL; virCheckDomainSnapshotReturn(snapshot, -1); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; if (conn->driver->domainSnapshotListAllChildren) { int ret = conn->driver->domainSnapshotListAllChildren(snapshot, snaps, @@ -958,7 +958,7 @@ virDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, virResetLastError(); virCheckDomainSnapshotReturn(snapshot, NULL); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; if (conn->driver->domainSnapshotGetParent) { virDomainSnapshotPtr snap; @@ -996,7 +996,7 @@ virDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, virResetLastError(); virCheckDomainSnapshotReturn(snapshot, -1); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; if (conn->driver->domainSnapshotIsCurrent) { int ret; @@ -1035,7 +1035,7 @@ virDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, virResetLastError(); virCheckDomainSnapshotReturn(snapshot, -1); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; if (conn->driver->domainSnapshotHasMetadata) { int ret; @@ -1106,7 +1106,7 @@ virDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, virResetLastError(); virCheckDomainSnapshotReturn(snapshot, -1); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; virCheckReadOnlyGoto(conn->flags, error); @@ -1163,7 +1163,7 @@ virDomainSnapshotDelete(virDomainSnapshotPtr snapshot, virResetLastError(); virCheckDomainSnapshotReturn(snapshot, -1); - conn = snapshot->domain->conn; + conn = virSnapDom(snapshot)->conn; virCheckReadOnlyGoto(conn->flags, error); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 75b5b26bca..31859c20c8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -193,7 +193,7 @@ qemuDomObjFromDomain(virDomainPtr domain) static virDomainObjPtr qemuDomObjFromSnapshot(virDomainSnapshotPtr snapshot) { - return qemuDomObjFromDomain(snapshot->domain); + return qemuDomObjFromDomain(virSnapDom(snapshot)); } @@ -218,7 +218,7 @@ static virDomainSnapshotObjPtr qemuSnapObjFromSnapshot(virDomainObjPtr vm, virDomainSnapshotPtr snapshot) { - return qemuSnapObjFromName(vm, snapshot->name); + return qemuSnapObjFromName(vm, virSnapName(snapshot)); } static int @@ -16059,7 +16059,7 @@ qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, if (!(vm = qemuDomObjFromSnapshot(snapshot))) return -1; - if (virDomainSnapshotListChildrenNamesEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainSnapshotListChildrenNamesEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) @@ -16089,7 +16089,7 @@ qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, if (!(vm = qemuDomObjFromSnapshot(snapshot))) return -1; - if (virDomainSnapshotNumChildrenEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainSnapshotNumChildrenEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) @@ -16119,13 +16119,13 @@ qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, if (!(vm = qemuDomObjFromSnapshot(snapshot))) return -1; - if (virDomainSnapshotListAllChildrenEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainSnapshotListAllChildrenEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) goto cleanup; - n = virDomainListSnapshots(vm->snapshots, snap, snapshot->domain, snaps, + n = virDomainListSnapshots(vm->snapshots, snap, virSnapDom(snapshot), snaps, flags); cleanup: @@ -16198,7 +16198,7 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, if (!(vm = qemuDomObjFromSnapshot(snapshot))) return NULL; - if (virDomainSnapshotGetParentEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainSnapshotGetParentEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) @@ -16211,7 +16211,7 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, goto cleanup; } - parent = virGetDomainSnapshot(snapshot->domain, snap->def->parent); + parent = virGetDomainSnapshot(virSnapDom(snapshot), snap->def->parent); cleanup: virDomainObjEndAPI(&vm); @@ -16252,7 +16252,7 @@ static char * qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, unsigned int flags) { - virQEMUDriverPtr driver = snapshot->domain->conn->privateData; + virQEMUDriverPtr driver = virSnapDom(snapshot)->conn->privateData; virDomainObjPtr vm = NULL; char *xml = NULL; virDomainSnapshotObjPtr snap = NULL; @@ -16263,13 +16263,13 @@ qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (!(vm = qemuDomObjFromSnapshot(snapshot))) return NULL; - if (virDomainSnapshotGetXMLDescEnsureACL(snapshot->domain->conn, vm->def, flags) < 0) + if (virDomainSnapshotGetXMLDescEnsureACL(virSnapDom(snapshot)->conn, vm->def, flags) < 0) goto cleanup; if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) goto cleanup; - virUUIDFormat(snapshot->domain->uuid, uuidstr); + virUUIDFormat(virSnapDom(snapshot)->uuid, uuidstr); xml = virDomainSnapshotDefFormat(uuidstr, snap->def, driver->caps, driver->xmlopt, @@ -16294,14 +16294,14 @@ qemuDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, if (!(vm = qemuDomObjFromSnapshot(snapshot))) return -1; - if (virDomainSnapshotIsCurrentEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainSnapshotIsCurrentEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) goto cleanup; ret = (vm->current_snapshot && - STREQ(snapshot->name, vm->current_snapshot->def->name)); + STREQ(virSnapName(snapshot), vm->current_snapshot->def->name)); cleanup: virDomainObjEndAPI(&vm); @@ -16322,7 +16322,7 @@ qemuDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, if (!(vm = qemuDomObjFromSnapshot(snapshot))) return -1; - if (virDomainSnapshotHasMetadataEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainSnapshotHasMetadataEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) @@ -16355,7 +16355,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) { - virQEMUDriverPtr driver = snapshot->domain->conn->privateData; + virQEMUDriverPtr driver = virSnapDom(snapshot)->conn->privateData; virDomainObjPtr vm = NULL; int ret = -1; virDomainSnapshotObjPtr snap = NULL; @@ -16398,7 +16398,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, cfg = virQEMUDriverGetConfig(driver); - if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainRevertToSnapshotEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (!(caps = virQEMUDriverGetCapabilities(driver, false))) @@ -16605,7 +16605,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, qemuDomainFixupCPUs(vm, &cookie->cpu) < 0) goto cleanup; - rc = qemuProcessStart(snapshot->domain->conn, driver, vm, + rc = qemuProcessStart(virSnapDom(snapshot)->conn, driver, vm, cookie ? cookie->cpu : NULL, jobType, NULL, -1, NULL, snap, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, @@ -16693,7 +16693,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, start_flags |= paused ? VIR_QEMU_PROCESS_START_PAUSED : 0; virObjectEventStateQueue(driver->domainEventState, event); - rc = qemuProcessStart(snapshot->domain->conn, driver, vm, NULL, + rc = qemuProcessStart(virSnapDom(snapshot)->conn, driver, vm, NULL, QEMU_ASYNC_JOB_START, NULL, -1, NULL, NULL, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, start_flags); @@ -16818,7 +16818,7 @@ static int qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) { - virQEMUDriverPtr driver = snapshot->domain->conn->privateData; + virQEMUDriverPtr driver = virSnapDom(snapshot)->conn->privateData; virDomainObjPtr vm = NULL; int ret = -1; virDomainSnapshotObjPtr snap = NULL; @@ -16837,7 +16837,7 @@ qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot, cfg = virQEMUDriverGetConfig(driver); - if (virDomainSnapshotDeleteEnsureACL(snapshot->domain->conn, vm->def) < 0) + if (virDomainSnapshotDeleteEnsureACL(virSnapDom(snapshot)->conn, vm->def) < 0) goto cleanup; if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index df28259042..49721536d0 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -7351,9 +7351,9 @@ make_nonnull_nwfilter_binding(remote_nonnull_nwfilter_binding *binding_dst, virN static int make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src) { - if (VIR_STRDUP(snapshot_dst->name, snapshot_src->name) < 0) + if (VIR_STRDUP(snapshot_dst->name, virSnapName(snapshot_src)) < 0) return -1; - if (make_nonnull_domain(&snapshot_dst->dom, snapshot_src->domain) < 0) { + if (make_nonnull_domain(&snapshot_dst->dom, virSnapDom(snapshot_src)) < 0) { VIR_FREE(snapshot_dst->name); return -1; } diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 5c4dd41227..f67ea1132c 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -8270,8 +8270,8 @@ make_nonnull_nwfilter_binding(remote_nonnull_nwfilter_binding *binding_dst, virN static void make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src) { - snapshot_dst->name = snapshot_src->name; - make_nonnull_domain(&snapshot_dst->dom, snapshot_src->domain); + snapshot_dst->name = virSnapName(snapshot_src); + make_nonnull_domain(&snapshot_dst->dom, virSnapDom(snapshot_src)); } /*----------------------------------------------------------------------*/ diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index ae3a42c4c1..985eb995aa 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -1335,7 +1335,7 @@ elsif ($mode eq "client") { if ($is_first_arg) { if ($name eq "domain_snapshot") { - $priv_src = "$arg_name->domain->conn"; + $priv_src = "virSnapDom($arg_name)->conn"; } else { $priv_src = "$arg_name->conn"; } diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4d49c987b5..8583a19208 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5945,13 +5945,13 @@ static virDomainSnapshotObjPtr testSnapObjFromSnapshot(virDomainObjPtr vm, virDomainSnapshotPtr snapshot) { - return testSnapObjFromName(vm, snapshot->name); + return testSnapObjFromName(vm, virSnapName(snapshot)); } static virDomainObjPtr testDomObjFromSnapshot(virDomainSnapshotPtr snapshot) { - return testDomObjFromDomain(snapshot->domain); + return testDomObjFromDomain(virSnapDom(snapshot)); } static int @@ -6089,7 +6089,7 @@ testDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, if (!(snap = testSnapObjFromSnapshot(vm, snapshot))) goto cleanup; - n = virDomainListSnapshots(vm->snapshots, snap, snapshot->domain, snaps, + n = virDomainListSnapshots(vm->snapshots, snap, virSnapDom(snapshot), snaps, flags); cleanup: @@ -6162,7 +6162,7 @@ testDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, goto cleanup; } - parent = virGetDomainSnapshot(snapshot->domain, snap->def->parent); + parent = virGetDomainSnapshot(virSnapDom(snapshot), snap->def->parent); cleanup: virDomainObjEndAPI(&vm); @@ -6202,7 +6202,7 @@ testDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, char *xml = NULL; virDomainSnapshotObjPtr snap = NULL; char uuidstr[VIR_UUID_STRING_BUFLEN]; - testDriverPtr privconn = snapshot->domain->conn->privateData; + testDriverPtr privconn = virSnapDom(snapshot)->conn->privateData; virCheckFlags(VIR_DOMAIN_SNAPSHOT_XML_SECURE, NULL); @@ -6212,7 +6212,7 @@ testDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (!(snap = testSnapObjFromSnapshot(vm, snapshot))) goto cleanup; - virUUIDFormat(snapshot->domain->uuid, uuidstr); + virUUIDFormat(virSnapDom(snapshot)->uuid, uuidstr); xml = virDomainSnapshotDefFormat(uuidstr, snap->def, privconn->caps, privconn->xmlopt, @@ -6236,7 +6236,7 @@ testDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, return -1; ret = (vm->current_snapshot && - STREQ(snapshot->name, vm->current_snapshot->def->name)); + STREQ(virSnapName(snapshot), vm->current_snapshot->def->name)); virDomainObjEndAPI(&vm); return ret; @@ -6545,7 +6545,7 @@ static int testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) { - testDriverPtr privconn = snapshot->domain->conn->privateData; + testDriverPtr privconn = virSnapDom(snapshot)->conn->privateData; virDomainObjPtr vm = NULL; virDomainSnapshotObjPtr snap = NULL; virObjectEventPtr event = NULL; @@ -6640,7 +6640,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, } virResetError(err); - testDomainShutdownState(snapshot->domain, vm, + testDomainShutdownState(virSnapDom(snapshot), vm, VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT); event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, @@ -6712,7 +6712,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, if (virDomainObjIsActive(vm)) { /* Transitions 4, 7 */ - testDomainShutdownState(snapshot->domain, vm, + testDomainShutdownState(virSnapDom(snapshot), vm, VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT); event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index b8dfb55ef4..49c7e8a27d 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -5732,7 +5732,7 @@ static int vboxSnapshotGetReadWriteDisks(virDomainSnapshotDefPtr def, virDomainSnapshotPtr snapshot) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID domiid; IMachine *machine = NULL; @@ -5756,7 +5756,7 @@ vboxSnapshotGetReadWriteDisks(virDomainSnapshotDefPtr def, if (openSessionForMachine(data, dom->uuid, &domiid, &machine) < 0) goto cleanup; - if (!(snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name))) + if (!(snap = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)))) goto cleanup; rc = gVBoxAPI.UISnapshot.GetId(snap, &snapIid); @@ -5972,7 +5972,7 @@ static int vboxSnapshotGetReadOnlyDisks(virDomainSnapshotDefPtr def, virDomainSnapshotPtr snapshot) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID domiid; ISnapshot *snap = NULL; @@ -5994,7 +5994,7 @@ vboxSnapshotGetReadOnlyDisks(virDomainSnapshotDefPtr def, if (openSessionForMachine(data, dom->uuid, &domiid, &machine) < 0) goto cleanup; - if (!(snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name))) + if (!(snap = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)))) goto cleanup; rc = gVBoxAPI.UISnapshot.GetMachine(snap, &snapMachine); @@ -6195,7 +6195,7 @@ vboxSnapshotGetReadOnlyDisks(virDomainSnapshotDefPtr def, static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, unsigned int flags) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID domiid; IMachine *machine = NULL; @@ -6218,12 +6218,12 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (openSessionForMachine(data, dom->uuid, &domiid, &machine) < 0) goto cleanup; - if (!(snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name))) + if (!(snap = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)))) goto cleanup; if (VIR_ALLOC(def) < 0 || !(def->dom = virDomainDefNew())) goto cleanup; - if (VIR_STRDUP(def->name, snapshot->name) < 0) + if (VIR_STRDUP(def->name, virSnapName(snapshot)) < 0) goto cleanup; if (gVBoxAPI.vboxSnapshotRedefine) { @@ -6265,7 +6265,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get description of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } if (str16) { @@ -6282,7 +6282,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get creation time of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } /* timestamp is in milliseconds while creationTime in seconds */ @@ -6292,7 +6292,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get parent of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } if (parent) { @@ -6300,7 +6300,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (NS_FAILED(rc) || !str16) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get name of parent of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } VBOX_UTF16_TO_UTF8(str16, &str8); @@ -6316,7 +6316,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get online state of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } if (online) @@ -6531,7 +6531,7 @@ static virDomainSnapshotPtr vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID iid; IMachine *machine = NULL; @@ -6550,20 +6550,20 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0) goto cleanup; - if (!(snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name))) + if (!(snap = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)))) goto cleanup; rc = gVBoxAPI.UISnapshot.GetParent(snap, &parent); if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get parent of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } if (!parent) { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, _("snapshot '%s' does not have a parent"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } @@ -6571,7 +6571,7 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, if (NS_FAILED(rc) || !nameUtf16) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get name of parent of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } VBOX_UTF16_TO_UTF8(nameUtf16, &name); @@ -6652,7 +6652,7 @@ vboxDomainSnapshotCurrent(virDomainPtr dom, unsigned int flags) static int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, unsigned int flags) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID iid; IMachine *machine = NULL; @@ -6671,7 +6671,7 @@ static int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, if (openSessionForMachine(data, dom->uuid, &iid, &machine) < 0) goto cleanup; - if (!(snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name))) + if (!(snap = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)))) goto cleanup; rc = gVBoxAPI.UIMachine.GetCurrentSnapshot(machine, ¤t); @@ -6698,7 +6698,7 @@ static int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, goto cleanup; } - ret = STREQ(snapshot->name, name); + ret = STREQ(virSnapName(snapshot), name); cleanup: VBOX_UTF8_FREE(name); @@ -6713,7 +6713,7 @@ static int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, static int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, unsigned int flags) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID iid; IMachine *machine = NULL; @@ -6729,7 +6729,7 @@ static int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, goto cleanup; /* Check that snapshot exists. If so, there is no metadata. */ - if (!(snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name))) + if (!(snap = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)))) goto cleanup; ret = 0; @@ -6744,7 +6744,7 @@ static int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID domiid; IMachine *machine = NULL; @@ -6763,7 +6763,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, if (openSessionForMachine(data, dom->uuid, &domiid, &machine) < 0) goto cleanup; - newSnapshot = vboxDomainSnapshotGet(data, dom, machine, snapshot->name); + newSnapshot = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)); if (!newSnapshot) goto cleanup; @@ -6771,7 +6771,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("could not get online state of snapshot %s"), - snapshot->name); + virSnapName(snapshot)); goto cleanup; } @@ -6908,7 +6908,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot) * the machine with the new file. */ - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; virDomainSnapshotDefPtr def = NULL; char *defXml = NULL; @@ -7345,7 +7345,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot) static int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) { - virDomainPtr dom = snapshot->domain; + virDomainPtr dom = virSnapDom(snapshot); vboxDriverPtr data = dom->conn->privateData; vboxIID domiid; IMachine *machine = NULL; @@ -7365,7 +7365,7 @@ static int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, if (openSessionForMachine(data, dom->uuid, &domiid, &machine) < 0) goto cleanup; - snap = vboxDomainSnapshotGet(data, dom, machine, snapshot->name); + snap = vboxDomainSnapshotGet(data, dom, machine, virSnapName(snapshot)); if (!snap) goto cleanup; diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 066d617524..1bf6daf9b0 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -2148,7 +2148,7 @@ static virDomainSnapshotObjPtr vzSnapObjFromSnapshot(virDomainSnapshotObjListPtr snapshots, virDomainSnapshotPtr snapshot) { - return vzSnapObjFromName(snapshots, snapshot->name); + return vzSnapObjFromName(snapshots, virSnapName(snapshot)); } static int @@ -2271,14 +2271,14 @@ vzDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, unsigned int flags) virDomainSnapshotObjPtr snap; char uuidstr[VIR_UUID_STRING_BUFLEN]; virDomainSnapshotObjListPtr snapshots = NULL; - vzConnPtr privconn = snapshot->domain->conn->privateData; + vzConnPtr privconn = virSnapDom(snapshot)->conn->privateData; virCheckFlags(VIR_DOMAIN_SNAPSHOT_XML_SECURE, NULL); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return NULL; - if (virDomainSnapshotGetXMLDescEnsureACL(snapshot->domain->conn, dom->def, flags) < 0) + if (virDomainSnapshotGetXMLDescEnsureACL(virSnapDom(snapshot)->conn, dom->def, flags) < 0) goto cleanup; if (!(snapshots = prlsdkLoadSnapshots(dom))) @@ -2287,7 +2287,7 @@ vzDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, unsigned int flags) if (!(snap = vzSnapObjFromSnapshot(snapshots, snapshot))) goto cleanup; - virUUIDFormat(snapshot->domain->uuid, uuidstr); + virUUIDFormat(virSnapDom(snapshot)->uuid, uuidstr); xml = virDomainSnapshotDefFormat(uuidstr, snap->def, privconn->driver->caps, privconn->driver->xmlopt, @@ -2311,10 +2311,10 @@ vzDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, unsigned int flags) virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS | VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return -1; - if (virDomainSnapshotNumChildrenEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainSnapshotNumChildrenEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; if (!(snapshots = prlsdkLoadSnapshots(dom))) @@ -2346,10 +2346,10 @@ vzDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS | VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return -1; - if (virDomainSnapshotListChildrenNamesEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainSnapshotListChildrenNamesEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; if (!(snapshots = prlsdkLoadSnapshots(dom))) @@ -2380,10 +2380,10 @@ vzDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS | VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return -1; - if (virDomainSnapshotListAllChildrenEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainSnapshotListAllChildrenEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; if (!(snapshots = prlsdkLoadSnapshots(dom))) @@ -2392,7 +2392,7 @@ vzDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, if (!(snap = vzSnapObjFromSnapshot(snapshots, snapshot))) goto cleanup; - n = virDomainListSnapshots(snapshots, snap, snapshot->domain, snaps, flags); + n = virDomainListSnapshots(snapshots, snap, virSnapDom(snapshot), snaps, flags); cleanup: virDomainSnapshotObjListFree(snapshots); @@ -2471,10 +2471,10 @@ vzDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) virCheckFlags(0, NULL); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return NULL; - if (virDomainSnapshotGetParentEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainSnapshotGetParentEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; if (!(snapshots = prlsdkLoadSnapshots(dom))) @@ -2490,7 +2490,7 @@ vzDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) goto cleanup; } - parent = virGetDomainSnapshot(snapshot->domain, snap->def->parent); + parent = virGetDomainSnapshot(virSnapDom(snapshot), snap->def->parent); cleanup: virDomainSnapshotObjListFree(snapshots); @@ -2543,17 +2543,17 @@ vzDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, unsigned int flags) virCheckFlags(0, -1); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return -1; - if (virDomainSnapshotIsCurrentEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainSnapshotIsCurrentEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; if (!(snapshots = prlsdkLoadSnapshots(dom))) goto cleanup; current = vzFindCurrentSnapshot(snapshots); - ret = current && STREQ(snapshot->name, current->def->name); + ret = current && STREQ(virSnapName(snapshot), current->def->name); cleanup: virDomainSnapshotObjListFree(snapshots); @@ -2573,10 +2573,10 @@ vzDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, virCheckFlags(0, -1); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return -1; - if (virDomainSnapshotHasMetadataEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainSnapshotHasMetadataEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; if (!(snapshots = prlsdkLoadSnapshots(dom))) @@ -2674,13 +2674,13 @@ vzDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) virCheckFlags(VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN, -1); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return -1; - if (virDomainSnapshotDeleteEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainSnapshotDeleteEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; - ret = prlsdkDeleteSnapshot(dom, snapshot->name, + ret = prlsdkDeleteSnapshot(dom, virSnapName(snapshot), flags & VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN); cleanup: @@ -2698,10 +2698,10 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1); - if (!(dom = vzDomObjFromDomain(snapshot->domain))) + if (!(dom = vzDomObjFromDomain(virSnapDom(snapshot)))) return -1; - if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0) + if (virDomainRevertToSnapshotEnsureACL(virSnapDom(snapshot)->conn, dom->def) < 0) goto cleanup; if (vzDomainObjBeginJob(dom) < 0) @@ -2711,7 +2711,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) if (vzEnsureDomainExists(dom) < 0) goto cleanup; - ret = prlsdkSwitchToSnapshot(dom, snapshot->name, + ret = prlsdkSwitchToSnapshot(dom, virSnapName(snapshot), flags & VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED); cleanup: if (job) -- 2.20.1
On Fri, Mar 15, 2019 at 12:02:31AM -0500, Eric Blake wrote:
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; the easiest way to share common code is to give both classes a common base class. If this were C++, we'd just use public member inheritance; but since it is C, we instead have to touch EVERY use of member fields that will be relocated. To avoid having to make future edits, wrap the majority of accesses behind static inline functions, so that we only have to touch one place when changing class inheritance; and temporarily rename the members to let the compiler ensure we caught all uses.
While it helps review, I'd rather not include the rename in the git history. Thankfully the next patch renames them to something else, not back to the same name.
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/datatypes.h | 22 +++++++--- src/datatypes.c | 10 ++--- src/esx/esx_driver.c | 66 ++++++++++++++--------------- src/libvirt-domain-snapshot.c | 24 +++++------ src/qemu/qemu_driver.c | 40 ++++++++--------- src/remote/remote_daemon_dispatch.c | 4 +- src/remote/remote_driver.c | 4 +- src/rpc/gendispatch.pl | 2 +- src/test/test_driver.c | 20 ++++----- src/vbox/vbox_common.c | 56 ++++++++++++------------ src/vz/vz_driver.c | 52 +++++++++++------------ 11 files changed, 156 insertions(+), 144 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
On 3/15/19 8:31 AM, Ján Tomko wrote:
On Fri, Mar 15, 2019 at 12:02:31AM -0500, Eric Blake wrote:
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; the easiest way to share common code is to give both classes a common base class. If this were C++, we'd just use public member inheritance; but since it is C, we instead have to touch EVERY use of member fields that will be relocated. To avoid having to make future edits, wrap the majority of accesses behind static inline functions, so that we only have to touch one place when changing class inheritance; and temporarily rename the members to let the compiler ensure we caught all uses.
While it helps review, I'd rather not include the rename in the git history. Thankfully the next patch renames them to something else, not back to the same name.
Okay, I'll hack that part out before pushing.
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/datatypes.h | 22 +++++++--- src/datatypes.c | 10 ++--- src/esx/esx_driver.c | 66 ++++++++++++++--------------- src/libvirt-domain-snapshot.c | 24 +++++------ src/qemu/qemu_driver.c | 40 ++++++++--------- src/remote/remote_daemon_dispatch.c | 4 +- src/remote/remote_driver.c | 4 +- src/rpc/gendispatch.pl | 2 +- src/test/test_driver.c | 20 ++++----- src/vbox/vbox_common.c | 56 ++++++++++++------------ src/vz/vz_driver.c | 52 +++++++++++------------ 11 files changed, 156 insertions(+), 144 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Jano
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; th eeasiest way to share common code is to give both classes a common base class. Thanks to the accessor functions in the previous patch, we have very few changes required outside of datatypes.[ch]. This also gets rid of the temporary rename hack that the previous patch used for compiler verification. Note that virClassNew() supports a NULL dispose method for a class that has nothing to clean up, but VIR_CLASS_NEW has no easy way to register such a class without a #define hack. I promised my teenage daughter Evelyn that I'd give her credit for her contribution to this commit. I asked her "What would be a good name for a base class for DomainSnapshot and DomainCheckpoint". After explaining what a base class was (using the classic OOB Square and Circle inherit from Shape), she came up with "DomainMoment", which is way better than my initial thought of "DomainPointInTime" or "DomainPIT". Signed-off-by: Eric Blake <eblake@redhat.com> --- src/datatypes.h | 23 +++++-- src/datatypes.c | 110 ++++++++++++++++++++-------------- src/libvirt-domain-snapshot.c | 2 +- 3 files changed, 85 insertions(+), 50 deletions(-) diff --git a/src/datatypes.h b/src/datatypes.h index dcba279bec..b675251500 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -31,6 +31,7 @@ extern virClassPtr virConnectClass; extern virClassPtr virDomainClass; +extern virClassPtr virDomainMomentClass; extern virClassPtr virDomainSnapshotClass; extern virClassPtr virInterfaceClass; extern virClassPtr virNetworkClass; @@ -668,27 +669,39 @@ struct _virStream { virFreeCallback ff; }; +/** + * _virDomainMoment + * + * Internal abstract structure serving as a base class to a named + * point in time object related to a domain + */ +typedef struct _virDomainMoment virDomainMoment; +typedef virDomainMoment *virDomainMomentPtr; +struct _virDomainMoment { + virObject parent; + char *name; + virDomainPtr domain; +}; + /** * _virDomainSnapshot * * Internal structure associated with a domain snapshot */ struct _virDomainSnapshot { - virObject parent; - char *_name; - virDomainPtr _domain; + virDomainMoment parent; }; static inline char * virSnapName(virDomainSnapshotPtr snapshot) { - return snapshot->_name; + return snapshot->parent.name; } static inline virDomainPtr virSnapDom(virDomainSnapshotPtr snapshot) { - return snapshot->_domain; + return snapshot->parent.domain; } /** diff --git a/src/datatypes.c b/src/datatypes.c index 916c259a6e..f0cfbe11fc 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -1,7 +1,7 @@ /* * datatypes.c: management of structs for public data types * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -36,6 +36,7 @@ VIR_LOG_INIT("datatypes"); virClassPtr virConnectClass; virClassPtr virConnectCloseCallbackDataClass; virClassPtr virDomainClass; +virClassPtr virDomainMomentClass; virClassPtr virDomainSnapshotClass; virClassPtr virInterfaceClass; virClassPtr virNetworkClass; @@ -50,7 +51,8 @@ virClassPtr virStoragePoolClass; static void virConnectDispose(void *obj); static void virConnectCloseCallbackDataDispose(void *obj); static void virDomainDispose(void *obj); -static void virDomainSnapshotDispose(void *obj); +static void virDomainMomentDispose(void *obj); +#define virDomainSnapshotDispose NULL static void virInterfaceDispose(void *obj); static void virNetworkDispose(void *obj); static void virNodeDeviceDispose(void *obj); @@ -86,7 +88,8 @@ virDataTypesOnceInit(void) DECLARE_CLASS_LOCKABLE(virConnect); DECLARE_CLASS_LOCKABLE(virConnectCloseCallbackData); DECLARE_CLASS(virDomain); - DECLARE_CLASS(virDomainSnapshot); + DECLARE_CLASS(virDomainMoment); + DECLARE_CLASS_COMMON(virDomainSnapshot, virDomainMomentClass); DECLARE_CLASS(virInterface); DECLARE_CLASS(virNetwork); DECLARE_CLASS(virNodeDevice); @@ -900,6 +903,64 @@ virNWFilterBindingDispose(void *obj) } +/** + * virGetDomainMoment: + * @domain: the domain involved in a point-in-time moment + * @name: pointer to the domain moment name + * + * Allocates a new concrete subclass of a domain moment object. When + * the object is no longer needed, virObjectUnref() must be called in + * order to not leak data. + * + * Returns a pointer to the domain moment object, or NULL on error. + */ +static virDomainMomentPtr +virGetDomainMoment(virDomainPtr domain, const char *name, virClassPtr subclass) +{ + virDomainMomentPtr ret = NULL; + + if (virDataTypesInitialize() < 0) + return NULL; + + virCheckDomainGoto(domain, error); + virCheckNonNullArgGoto(name, error); + + if (!(ret = virObjectNew(subclass))) + goto error; + if (VIR_STRDUP(ret->name, name) < 0) + goto error; + + ret->domain = virObjectRef(domain); + + return ret; + + error: + virObjectUnref(ret); + return NULL; +} + + +/** + * virDomainMomentDispose: + * @obj: the domain moment to release + * + * Unconditionally release all memory associated with a moment. + * The object must not be used once this method returns. + * + * It will also unreference the associated connection object, + * which may also be released if its ref count hits zero. + */ +static void +virDomainMomentDispose(void *obj) +{ + virDomainMomentPtr moment = obj; + VIR_DEBUG("release moment %p %s", moment, moment->name); + + VIR_FREE(moment->name); + virObjectUnref(moment->domain); +} + + /** * virGetDomainSnapshot: * @domain: the domain to snapshot @@ -913,47 +974,8 @@ virNWFilterBindingDispose(void *obj) virDomainSnapshotPtr virGetDomainSnapshot(virDomainPtr domain, const char *name) { - virDomainSnapshotPtr ret = NULL; - - if (virDataTypesInitialize() < 0) - return NULL; - - virCheckDomainGoto(domain, error); - virCheckNonNullArgGoto(name, error); - - if (!(ret = virObjectNew(virDomainSnapshotClass))) - goto error; - if (VIR_STRDUP(ret->_name, name) < 0) - goto error; - - ret->_domain = virObjectRef(domain); - - return ret; - - error: - virObjectUnref(ret); - return NULL; -} - - -/** - * virDomainSnapshotDispose: - * @obj: the domain snapshot to release - * - * Unconditionally release all memory associated with a snapshot. - * The snapshot object must not be used once this method returns. - * - * It will also unreference the associated connection object, - * which may also be released if its ref count hits zero. - */ -static void -virDomainSnapshotDispose(void *obj) -{ - virDomainSnapshotPtr snapshot = obj; - VIR_DEBUG("release snapshot %p %s", snapshot, snapshot->_name); - - VIR_FREE(snapshot->_name); - virObjectUnref(snapshot->_domain); + return (virDomainSnapshotPtr) virGetDomainMoment(domain, name, + virDomainSnapshotClass); } diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c index e1275c69b0..27fb350cc6 100644 --- a/src/libvirt-domain-snapshot.c +++ b/src/libvirt-domain-snapshot.c @@ -1206,7 +1206,7 @@ int virDomainSnapshotRef(virDomainSnapshotPtr snapshot) { VIR_DEBUG("snapshot=%p, refs=%d", snapshot, - snapshot ? snapshot->parent.u.s.refs : 0); + snapshot ? snapshot->parent.parent.u.s.refs : 0); virResetLastError(); -- 2.20.1
On 3/15/19 12:02 AM, Eric Blake wrote:
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; th eeasiest way to share common code
I can't type late at night :) virDomainSnapshot; the easiest (and copy-pasted into 8/8) -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On Fri, Mar 15, 2019 at 12:02:32AM -0500, Eric Blake wrote:
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; th eeasiest way to share common code is to give both classes a common base class. Thanks to the accessor functions in the previous patch, we have very few changes required outside of datatypes.[ch]. This also gets rid of the temporary rename hack that the previous patch used for compiler verification.
Note that virClassNew() supports a NULL dispose method for a class that has nothing to clean up, but VIR_CLASS_NEW has no easy way to register such a class without a #define hack.
I promised my teenage daughter Evelyn that I'd give her credit for her contribution to this commit. I asked her "What would be a good name for a base class for DomainSnapshot and DomainCheckpoint". After explaining what a base class was (using the classic OOB Square and Circle inherit from Shape), she came up with "DomainMoment", which is way better than my initial thought of "DomainPointInTime" or "DomainPIT".
Naming-suggested-by: Evelyn
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/datatypes.h | 23 +++++-- src/datatypes.c | 110 ++++++++++++++++++++-------------- src/libvirt-domain-snapshot.c | 2 +- 3 files changed, 85 insertions(+), 50 deletions(-)
diff --git a/src/datatypes.h b/src/datatypes.h index dcba279bec..b675251500 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -31,6 +31,7 @@
extern virClassPtr virConnectClass; extern virClassPtr virDomainClass; +extern virClassPtr virDomainMomentClass; extern virClassPtr virDomainSnapshotClass; extern virClassPtr virInterfaceClass; extern virClassPtr virNetworkClass; @@ -668,27 +669,39 @@ struct _virStream { virFreeCallback ff; };
+/** + * _virDomainMoment + * + * Internal abstract structure serving as a base class to a named + * point in time object related to a domain + */ +typedef struct _virDomainMoment virDomainMoment; +typedef virDomainMoment *virDomainMomentPtr; +struct _virDomainMoment { + virObject parent; + char *name; + virDomainPtr domain; +}; + /** * _virDomainSnapshot * * Internal structure associated with a domain snapshot */ struct _virDomainSnapshot { - virObject parent; - char *_name; - virDomainPtr _domain; + virDomainMoment parent;
This breaks the test suite, saying: error : object size 32 of virDomainSnapshot is smaller than parent class 32 Jano
On 3/15/19 8:34 AM, Ján Tomko wrote:
On Fri, Mar 15, 2019 at 12:02:32AM -0500, Eric Blake wrote:
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; th eeasiest way to share common code is to give both classes a common base class. Thanks to the accessor functions in the previous patch, we have very few changes required outside of datatypes.[ch]. This also gets rid of the temporary rename hack that the previous patch used for compiler verification.
struct _virDomainSnapshot { - virObject parent; - char *_name; - virDomainPtr _domain; + virDomainMoment parent;
This breaks the test suite, saying: error : object size 32 of virDomainSnapshot is smaller than parent class 32
The error message is wrong, but yes, I'll need to patch virObject first to allow a child class that adds nothing over its base class. (Serves me right for mailing patches at midnight) -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On Fri, Mar 15, 2019 at 08:51:39AM -0500, Eric Blake wrote:
On 3/15/19 8:34 AM, Ján Tomko wrote:
On Fri, Mar 15, 2019 at 12:02:32AM -0500, Eric Blake wrote:
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; th eeasiest way to share common code is to give both classes a common base class. Thanks to the accessor functions in the previous patch, we have very few changes required outside of datatypes.[ch]. This also gets rid of the temporary rename hack that the previous patch used for compiler verification.
struct _virDomainSnapshot { - virObject parent; - char *_name; - virDomainPtr _domain; + virDomainMoment parent;
This breaks the test suite, saying: error : object size 32 of virDomainSnapshot is smaller than parent class 32
The error message is wrong, but yes, I'll need to patch virObject first to allow a child class that adds nothing over its base class. (Serves me right for mailing patches at midnight)
Or add a dummy bool member to the subclass to make it bigger Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Prepare for introducing a bunch of new public APIs related to backup checkpoints by first introducing a new internal type and errors associated with that type. Checkpoints are modeled heavily after virDomainSnapshotPtr (both represent a point in time of the guest), although a snapshot exists with the intent of rolling back to that state, while a checkpoint exists to make it possible to create an incremental backup at a later time. Thus, it shares the common virDomainMoment base class created in the previous patches. Signed-off-by: Eric Blake <eblake@redhat.com> --- include/libvirt/virterror.h | 6 +++++- src/util/virerror.c | 12 ++++++++++- include/libvirt/libvirt.h | 6 +++++- src/datatypes.h | 42 ++++++++++++++++++++++++++++++++++++- src/datatypes.c | 22 +++++++++++++++++++ src/libvirt_private.syms | 2 ++ 6 files changed, 86 insertions(+), 4 deletions(-) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 3c19ff5e2e..bccf3c731e 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -4,7 +4,7 @@ * Description: Provides the interfaces of the libvirt library to handle * errors raised while using the library. * - * Copyright (C) 2006-2016 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -132,6 +132,7 @@ typedef enum { VIR_FROM_LIBSSH = 66, /* Error from libssh connection transport */ VIR_FROM_RESCTRL = 67, /* Error from resource control */ VIR_FROM_FIREWALLD = 68, /* Error from firewalld */ + VIR_FROM_DOMAIN_CHECKPOINT = 69,/* Error from domain checkpoint */ # ifdef VIR_ENUM_SENTINELS VIR_ERR_DOMAIN_LAST @@ -322,6 +323,9 @@ typedef enum { VIR_ERR_DEVICE_MISSING = 99, /* fail to find the desired device */ VIR_ERR_INVALID_NWFILTER_BINDING = 100, /* invalid nwfilter binding */ VIR_ERR_NO_NWFILTER_BINDING = 101, /* no nwfilter binding */ + VIR_ERR_INVALID_DOMAIN_CHECKPOINT = 102, /* invalid domain checkpoint */ + VIR_ERR_NO_DOMAIN_CHECKPOINT = 103, /* domain checkpoint not found */ + VIR_ERR_NO_DOMAIN_BACKUP = 104, /* domain backup job id not found */ # ifdef VIR_ENUM_SENTINELS VIR_ERR_NUMBER_LAST diff --git a/src/util/virerror.c b/src/util/virerror.c index 91a513160f..05e535d859 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -1,7 +1,7 @@ /* * virerror.c: error handling and reporting code for libvirt * - * Copyright (C) 2006, 2008-2016 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -139,6 +139,7 @@ VIR_ENUM_IMPL(virErrorDomain, VIR_ERR_DOMAIN_LAST, "Libssh transport layer", "Resource control", "FirewallD", + "Domain Checkpoint", ); @@ -1214,6 +1215,15 @@ const virErrorMsgTuple virErrorMsgStrings[VIR_ERR_NUMBER_LAST] = { [VIR_ERR_NO_NWFILTER_BINDING] = { N_("Network filter binding not found"), N_("Network filter binding not found: %s") }, + [VIR_ERR_INVALID_DOMAIN_CHECKPOINT] = { + N_("Invalid domain checkpoint"), + N_("Invalid domain checkpoint: %s") }, + [VIR_ERR_NO_DOMAIN_CHECKPOINT] = { + N_("Domain checkpoint not found"), + N_("Domain checkpoint not found: %s") }, + [VIR_ERR_NO_DOMAIN_BACKUP] = { + N_("Domain backup job id not found"), + N_("Domain backup job id not found: %s") }, }; diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h index 20e5d276a7..13de151cb6 100644 --- a/include/libvirt/libvirt.h +++ b/include/libvirt/libvirt.h @@ -4,7 +4,7 @@ * Description: Provides the interfaces of the libvirt library to handle * virtualized domains * - * Copyright (C) 2005-2006, 2010-2014 Red Hat, Inc. + * Copyright (C) 2005-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -34,6 +34,10 @@ extern "C" { # include <libvirt/libvirt-common.h> # include <libvirt/libvirt-host.h> # include <libvirt/libvirt-domain.h> +/* FIXME: Temporary hack until later patch creates new + * libvirt-domain-checkpoint.h file */ +typedef struct _virDomainCheckpoint virDomainCheckpoint; +typedef virDomainCheckpoint *virDomainCheckpointPtr; # include <libvirt/libvirt-domain-snapshot.h> # include <libvirt/libvirt-event.h> # include <libvirt/libvirt-interface.h> diff --git a/src/datatypes.h b/src/datatypes.h index b675251500..03feb5b18f 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -32,6 +32,7 @@ extern virClassPtr virConnectClass; extern virClassPtr virDomainClass; extern virClassPtr virDomainMomentClass; +extern virClassPtr virDomainCheckpointClass; extern virClassPtr virDomainSnapshotClass; extern virClassPtr virInterfaceClass; extern virClassPtr virNetworkClass; @@ -293,7 +294,23 @@ extern virClassPtr virAdmClientClass; } \ } while (0) -# define virCheckDomainSnapshotReturn(obj, retval) \ + +# define virCheckDomainCheckpointReturn(obj, retval) \ + do { \ + virDomainCheckpointPtr _check = (obj); \ + if (!virObjectIsClass(_check, virDomainCheckpointClass) || \ + !virObjectIsClass(virChkDom(_check), virDomainClass) || \ + !virObjectIsClass(virChkDom(_check)->conn, virConnectClass)) { \ + virReportErrorHelper(VIR_FROM_DOMAIN_CHECKPOINT, \ + VIR_ERR_INVALID_DOMAIN_CHECKPOINT, \ + __FILE__, __FUNCTION__, __LINE__, \ + __FUNCTION__); \ + virDispatchError(NULL); \ + return retval; \ + } \ + } while (0) + +# define virCheckDomainSnapshotReturn(obj, retval) \ do { \ virDomainSnapshotPtr _snap = (obj); \ if (!virObjectIsClass(_snap, virDomainSnapshotClass) || \ @@ -683,6 +700,27 @@ struct _virDomainMoment { virDomainPtr domain; }; +/* + * _virDomainCheckpoint + * + * Internal structure associated with a domain checkpoint + */ +struct _virDomainCheckpoint { + virDomainMoment parent; +}; + +static inline char * +virChkName(virDomainCheckpointPtr checkpoint) +{ + return checkpoint->parent.name; +} + +static inline virDomainPtr +virChkDom(virDomainCheckpointPtr checkpoint) +{ + return checkpoint->parent.domain; +} + /** * _virDomainSnapshot * @@ -769,6 +807,8 @@ virNWFilterPtr virGetNWFilter(virConnectPtr conn, virNWFilterBindingPtr virGetNWFilterBinding(virConnectPtr conn, const char *portdev, const char *filtername); +virDomainCheckpointPtr virGetDomainCheckpoint(virDomainPtr domain, + const char *name); virDomainSnapshotPtr virGetDomainSnapshot(virDomainPtr domain, const char *name); diff --git a/src/datatypes.c b/src/datatypes.c index f0cfbe11fc..ec22a7b38a 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -37,6 +37,7 @@ virClassPtr virConnectClass; virClassPtr virConnectCloseCallbackDataClass; virClassPtr virDomainClass; virClassPtr virDomainMomentClass; +virClassPtr virDomainCheckpointClass; virClassPtr virDomainSnapshotClass; virClassPtr virInterfaceClass; virClassPtr virNetworkClass; @@ -52,6 +53,7 @@ static void virConnectDispose(void *obj); static void virConnectCloseCallbackDataDispose(void *obj); static void virDomainDispose(void *obj); static void virDomainMomentDispose(void *obj); +#define virDomainCheckpointDispose NULL #define virDomainSnapshotDispose NULL static void virInterfaceDispose(void *obj); static void virNetworkDispose(void *obj); @@ -89,6 +91,7 @@ virDataTypesOnceInit(void) DECLARE_CLASS_LOCKABLE(virConnectCloseCallbackData); DECLARE_CLASS(virDomain); DECLARE_CLASS(virDomainMoment); + DECLARE_CLASS_COMMON(virDomainCheckpoint, virDomainMomentClass); DECLARE_CLASS_COMMON(virDomainSnapshot, virDomainMomentClass); DECLARE_CLASS(virInterface); DECLARE_CLASS(virNetwork); @@ -961,6 +964,25 @@ virDomainMomentDispose(void *obj) } +/** + * virGetDomainCheckpoint: + * @domain: the domain to checkpoint + * @name: pointer to the domain checkpoint name + * + * Allocates a new domain checkpoint object. When the object is no longer needed, + * virObjectUnref() must be called in order to not leak data. + * + * Returns a pointer to the domain checkpoint object, or NULL on error. + */ +virDomainCheckpointPtr +virGetDomainCheckpoint(virDomainPtr domain, + const char *name) +{ + return (virDomainCheckpointPtr) virGetDomainMoment(domain, name, + virDomainCheckpointClass); +} + + /** * virGetDomainSnapshot: * @domain: the domain to snapshot diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 758ec9f102..96147c093a 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1243,10 +1243,12 @@ virConnectCloseCallbackDataClass; virConnectCloseCallbackDataGetCallback; virConnectCloseCallbackDataRegister; virConnectCloseCallbackDataUnregister; +virDomainCheckpointClass; virDomainClass; virDomainSnapshotClass; virGetConnect; virGetDomain; +virGetDomainCheckpoint; virGetDomainSnapshot; virGetInterface; virGetNetwork; -- 2.20.1
On Fri, Mar 15, 2019 at 12:02:33AM -0500, Eric Blake wrote:
Prepare for introducing a bunch of new public APIs related to backup checkpoints by first introducing a new internal type and errors associated with that type. Checkpoints are modeled heavily after virDomainSnapshotPtr (both represent a point in time of the guest), although a snapshot exists with the intent of rolling back to that state, while a checkpoint exists to make it possible to create an incremental backup at a later time. Thus, it shares the common virDomainMoment base class created in the previous patches.
Signed-off-by: Eric Blake <eblake@redhat.com> --- include/libvirt/virterror.h | 6 +++++- src/util/virerror.c | 12 ++++++++++- include/libvirt/libvirt.h | 6 +++++- src/datatypes.h | 42 ++++++++++++++++++++++++++++++++++++- src/datatypes.c | 22 +++++++++++++++++++ src/libvirt_private.syms | 2 ++ 6 files changed, 86 insertions(+), 4 deletions(-)
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 3c19ff5e2e..bccf3c731e 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -4,7 +4,7 @@ * Description: Provides the interfaces of the libvirt library to handle * errors raised while using the library. * - * Copyright (C) 2006-2016 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -132,6 +132,7 @@ typedef enum { VIR_FROM_LIBSSH = 66, /* Error from libssh connection transport */ VIR_FROM_RESCTRL = 67, /* Error from resource control */ VIR_FROM_FIREWALLD = 68, /* Error from firewalld */ + VIR_FROM_DOMAIN_CHECKPOINT = 69,/* Error from domain checkpoint */
Missing space
# ifdef VIR_ENUM_SENTINELS VIR_ERR_DOMAIN_LAST
Jano
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below:
Message-id: 20190315050233.10782-1-eblake@redhat.com
Subject: [libvirt] [PATCH v6 0/8] Incremental backups: virDomainSnapshot class
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script will be invoked under the git checkout with
# HEAD pointing to a commit that has the patches applied on top of "base"
# branch
time bash -c './autogen.sh && make syntax-check'
=== TEST SCRIPT END ===
Updating bcb55ab053bc79561b55d0394490f4b64e0f2d01
>From https://github.com/patchew-project/libvirt
 * [new tag]         patchew/20190315050233.10782-1-eblake@redhat.com -> patchew/20190315050233.10782-1-eblake@redhat.com
Switched to a new branch 'test'
11187de backup: Introduce virDomainCheckpointPtr
4ea6033 snapshot: Create virDomainMoment base class
3bc8c71 snapshot: Use accessors for virDomainSnapshot members
3d97dc1 snapshot: Break out virDomainSnapshotObjList into its own file
c91a654 snapshot: Export two functions prior to file split
65629bf snapshot: Break out virDomainSnapshotObj into its own file
30dbdce snapshot: Sort virconftypes.h
fbf33c4 snapshot: Split domain forward typedefs into new file
=== OUTPUT BEGIN ===
Updating submodules...
Submodule 'gnulib' (https://git.savannah.gnu.org/git/gnulib.git/) registered for path '.gnulib'
Submodule 'keycodemapdb' (https://gitlab.com/keycodemap/keycodemapdb.git) registered for path 'src/keycodemapdb'
Cloning into '.gnulib'...
remote: Counting objects: 80863           
remote: Counting objects: 145369           
remote: Counting objects: 201986, done.        
remote: Compressing objects:   0% (1/26877)           
remote: Compressing objects:   1% (269/26877)           
remote: Compressing objects:   2% (538/26877)           
remote: Compressing objects:   3% (807/26877)           
remote: Compressing objects:   4% (1076/26877)           
remote: Compressing objects:   5% (1344/26877)           
remote: Compressing objects:   6% (1613/26877)           
remote: Compressing objects:   7% (1882/26877)           
remote: Compressing objects:   8% (2151/26877)           
remote: Compressing objects:   9% (2419/26877)           
remote: Compressing objects:  10% (2688/26877)           
remote: Compressing objects:  11% (2957/26877)           
remote: Compressing objects:  12% (3226/26877)           
remote: Compressing objects:  13% (3495/26877)           
remote: Compressing objects:  14% (3763/26877)           
remote: Compressing objects:  15% (4032/26877)           
remote: Compressing objects:  16% (4301/26877)           
remote: Compressing objects:  17% (4570/26877)           
remote: Compressing objects:  18% (4838/26877)           
remote: Compressing objects:  19% (5107/26877)           
remote: Compressing objects:  20% (5376/26877)           
remote: Compressing objects:  21% (5645/26877)           
remote: Compressing objects:  22% (5913/26877)           
remote: Compressing objects:  23% (6182/26877)           
remote: Compressing objects:  24% (6451/26877)           
remote: Compressing objects:  25% (6720/26877)           
remote: Compressing objects:  26% (6989/26877)           
remote: Compressing objects:  27% (7257/26877)           
remote: Compressing objects:  28% (7526/26877)           
remote: Compressing objects:  29% (7795/26877)           
remote: Compressing objects:  30% (8064/26877)           
remote: Compressing objects:  31% (8332/26877)           
remote: Compressing objects:  32% (8601/26877)           
remote: Compressing objects:  33% (8870/26877)           
remote: Compressing objects:  34% (9139/26877)           
remote: Compressing obje
cts:  35% (9407/26877)           
remote: Compressing objects:  36% (9676/26877)           
remote: Compressing objects:  37% (9945/26877)           
remote: Compressing objects:  38% (10214/26877)           
remote: Compressing objects:  39% (10483/26877)           
remote: Compressing objects:  40% (10751/26877)           
remote: Compressing objects:  41% (11020/26877)           
remote: Compressing objects:  42% (11289/26877)           
remote: Compressing objects:  43% (11558/26877)           
remote: Compressing objects:  44% (11826/26877)           
remote: Compressing objects:  45% (12095/26877)           
remote: Compressing objects:  46% (12364/26877)           
remote: Compressing objects:  47% (12633/26877)           
remote: Compressing objects:  48% (12901/26877)           
remote: Compressing objects:  49% (13170/26877)           
remote: Compressing objects:  50% (13439/26877)           
remote: Compressing objects:  51% (13708/26877)           
remote: Compressing objects:  52% (13977/26877)           
remote: Compressing objects:  53% (14245/26877)           
remote: Compressing objects:  54% (14514/26877)           
remote: Compressing objects:  55% (14783/26877)           
remote: Compressing objects:  56% (15052/26877)           
remote: Compressing objects:  57% (15320/26877)           
remote: Compressing objects:  58% (15589/26877)           
remote: Compressing objects:  59% (15858/26877)           
remote: Compressing objects:  60% (16127/26877)           
remote: Compressing objects:  61% (16395/26877)           
remote: Compressing objects:  62% (16664/26877)           
remote: Compressing objects:  63% (16933/26877)           
remote: Compressing objects:  64% (17202/26877)           
remote: Compressing objects:  65% (17471/26877)           
remote: Compressing objects:  66% (17739/26877)           
remote: Compressing objects:  67% (18008/26877)           
remote: Compressing objects:  68% (18277/26877)           
remote: Compressing objects:  69% (18546/26877)           
remote: Co
mpressing objects:  70% (18814/26877)           
remote: Compressing objects:  71% (19083/26877)           
remote: Compressing objects:  72% (19352/26877)           
remote: Compressing objects:  73% (19621/26877)           
remote: Compressing objects:  74% (19889/26877)           
remote: Compressing objects:  75% (20158/26877)           
remote: Compressing objects:  76% (20427/26877)           
remote: Compressing objects:  77% (20696/26877)           
remote: Compressing objects:  78% (20965/26877)           
remote: Compressing objects:  79% (21233/26877)           
remote: Compressing objects:  80% (21502/26877)           
remote: Compressing objects:  81% (21771/26877)           
remote: Compressing objects:  82% (22040/26877)           
remote: Compressing objects:  83% (22308/26877)           
remote: Compressing objects:  84% (22577/26877)           
remote: Compressing objects:  85% (22846/26877)           
remote: Compressing objects:  86% (23115/26877)           
remote: Compressing objects:  87% (23383/26877)           
remote: Compressing objects:  88% (23652/26877)           
remote: Compressing objects:  89% (23921/26877)           
remote: Compressing objects:  90% (24190/26877)           
remote: Compressing objects:  91% (24459/26877)           
remote: Compressing objects:  92% (24727/26877)           
remote: Compressing objects:  93% (24996/26877)           
remote: Compressing objects:  94% (25265/26877)           
remote: Compressing objects:  95% (25534/26877)           
remote: Compressing objects:  96% (25802/26877)           
remote: Compressing objects:  97% (26071/26877)           
remote: Compressing objects:  98% (26340/26877)           
remote: Compressing objects:  99% (26609/26877)           
remote: Compressing objects: 100% (26877/26877)           
remote: Compressing objects: 100% (26877/26877), done.        
Receiving objects:   0% (1/201986)   
Receiving objects:   1% (2020/201986), 28.00 KiB | 33.00 KiB/s   
Receiving objects:   1% (2313/201986), 28.00 KiB | 33.00 KiB/s   
Receiving objects:   2% (4040/201986), 28.00 KiB | 33.00 KiB/s   
Receiving objects:   3% (6060/201986), 28.00 KiB | 33.00 KiB/s   
Receiving objects:   4% (8080/201986), 1.78 MiB | 1.45 MiB/s   
Receiving objects:   5% (10100/201986), 1.78 MiB | 1.45 MiB/s   
Receiving objects:   6% (12120/201986), 1.78 MiB | 1.45 MiB/s   
Receiving objects:   7% (14140/201986), 1.78 MiB | 1.45 MiB/s   
Receiving objects:   8% (16159/201986), 1.78 MiB | 1.45 MiB/s   
Receiving objects:   9% (18179/201986), 1.78 MiB | 1.45 MiB/s   
Receiving objects:  10% (20199/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  10% (21392/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  11% (22219/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  12% (24239/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  13% (26259/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  14% (28279/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  15% (30298/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  16% (32318/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  17% (34338/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  18% (36358/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  19% (38378/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  20% (40398/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  21% (42418/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  22% (44437/201986), 4.72 MiB | 2.74 MiB/s   
Receiving objects:  23% (46457/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  24% (48477/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  25% (50497/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  26% (52517/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  27% (54537/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  28% (56557/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  29% (58576/201986), 10.88 MiB |
 4.89 MiB/s   
Receiving objects:  30% (60596/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  31% (62616/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  32% (64636/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  33% (66656/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  34% (68676/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  35% (70696/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  36% (72715/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  37% (74735/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  38% (76755/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  39% (78775/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  40% (80795/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  41% (82815/201986), 10.88 MiB | 4.89 MiB/s   
Receiving objects:  42% (84835/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  43% (86854/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  44% (88874/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  45% (90894/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  46% (92914/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  47% (94934/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  48% (96954/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  49% (98974/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  50% (100993/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  51% (103013/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  52% (105033/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  53% (107053/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  54% (109073/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  55% (111093/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  56% (113113/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  57% (115133/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  58% (117152/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  59% (119172/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  59% (120613/201986), 19
.98 MiB | 7.33 MiB/s   
Receiving objects:  60% (121192/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  61% (123212/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  62% (125232/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  63% (127252/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  64% (129272/201986), 19.98 MiB | 7.33 MiB/s   
Receiving objects:  65% (131291/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  66% (133311/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  67% (135331/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  68% (137351/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  69% (139371/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  70% (141391/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  71% (143411/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  72% (145430/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  73% (147450/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  74% (149470/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  75% (151490/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  76% (153510/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  77% (155530/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  78% (157550/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  79% (159569/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  80% (161589/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  81% (163609/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  82% (165629/201986), 27.26 MiB | 8.44 MiB/s   
Receiving objects:  83% (167649/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  84% (169669/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  85% (171689/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  86% (173708/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  87% (175728/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  88% (177748/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  89% (179768/201986), 36.16 MiB | 9.70 MiB/s   
Receiving obje
cts:  90% (181788/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  91% (183808/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  92% (185828/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  93% (187847/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  94% (189867/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  95% (191887/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  96% (193907/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  97% (195927/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  98% (197947/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects:  99% (199967/201986), 36.16 MiB | 9.70 MiB/s   
remote: Total 201986 (delta 175189), reused 201801 (delta 175043)        
Receiving objects: 100% (201986/201986), 36.16 MiB | 9.70 MiB/s   
Receiving objects: 100% (201986/201986), 39.98 MiB | 9.70 MiB/s, done.
Resolving deltas:   0% (0/175189)   
Resolving deltas:   1% (1785/175189)   
Resolving deltas:   2% (3943/175189)   
Resolving deltas:   3% (5258/175189)   
Resolving deltas:   4% (7032/175189)   
Resolving deltas:   5% (8841/175189)   
Resolving deltas:   6% (10654/175189)   
Resolving deltas:   7% (12789/175189)   
Resolving deltas:   8% (14090/175189)   
Resolving deltas:   9% (15803/175189)   
Resolving deltas:  10% (18186/175189)   
Resolving deltas:  11% (19755/175189)   
Resolving deltas:  12% (21056/175189)   
Resolving deltas:  13% (23068/175189)   
Resolving deltas:  13% (24501/175189)   
Resolving deltas:  14% (24762/175189)   
Resolving deltas:  15% (27364/175189)   
Resolving deltas:  16% (28341/175189)   
Resolving deltas:  17% (30055/175189)   
Resolving deltas:  18% (31664/175189)   
Resolving deltas:  19% (33424/175189)   
Resolving deltas:  20% (35654/175189)   
Resolving deltas:  21% (36808/175189)   
Resolving deltas:  22% (38590/175189)   
Resolving deltas:  23% (40485/175189)   
Resolving deltas:  24% (42207/175189)   
Resolving deltas:  25% (43826/175189)   
Resolving deltas:  26% (45669/175189)   
Resolving deltas:  27% (47426/175189)   
Resolving deltas:  28% (49101/175189)   
Resolving deltas:  29% (50808/175189)   
Resolving deltas:  30% (52910/175189)   
Resolving deltas:  31% (54477/175189)   
Resolving deltas:  32% (56375/175189)   
Resolving deltas:  33% (58269/175189)   
Resolving deltas:  34% (60074/175189)   
Resolving deltas:  35% (61381/175189)   
Resolving deltas:  36% (63178/175189)   
Resolving deltas:  37% (64834/175189)   
Resolving deltas:  38% (66727/175189)   
Resolving deltas:  39% (68324/175189)   
Resolving deltas:  40% (70085/175189)   
Resolving deltas:  41% (71846/175189)   
Resolving deltas:  42% (73614/175189)   
Resolving deltas:  43% (75365/175189)   
Resolving deltas:  44% (77118/175189)   
Resolving deltas:  44% (78061/175189)   
Resolving deltas:  45% (78841/175189)   
Resolving deltas:  46% (80632/175189)   
Resolving deltas:  47% (82508/175189)   
Resolvi
ng deltas:  48% (84094/175189)   
Resolving deltas:  49% (85844/175189)   
Resolving deltas:  50% (87608/175189)   
Resolving deltas:  51% (89359/175189)   
Resolving deltas:  52% (91116/175189)   
Resolving deltas:  53% (92876/175189)   
Resolving deltas:  54% (94660/175189)   
Resolving deltas:  55% (96387/175189)   
Resolving deltas:  56% (98124/175189)   
Resolving deltas:  57% (99858/175189)   
Resolving deltas:  58% (101626/175189)   
Resolving deltas:  59% (103415/175189)   
Resolving deltas:  60% (105124/175189)   
Resolving deltas:  61% (106896/175189)   
Resolving deltas:  62% (108709/175189)   
Resolving deltas:  63% (110385/175189)   
Resolving deltas:  64% (112126/175189)   
Resolving deltas:  65% (113929/175189)   
Resolving deltas:  66% (115648/175189)   
Resolving deltas:  67% (117378/175189)   
Resolving deltas:  68% (119134/175189)   
Resolving deltas:  68% (120146/175189)   
Resolving deltas:  69% (120882/175189)   
Resolving deltas:  70% (122648/175189)   
Resolving deltas:  71% (124523/175189)   
Resolving deltas:  72% (126153/175189)   
Resolving deltas:  73% (127892/175189)   
Resolving deltas:  74% (129640/175189)   
Resolving deltas:  75% (131462/175189)   
Resolving deltas:  76% (133181/175189)   
Resolving deltas:  77% (134939/175189)   
Resolving deltas:  78% (136651/175189)   
Resolving deltas:  79% (138524/175189)   
Resolving deltas:  80% (140220/175189)   
Resolving deltas:  81% (141959/175189)   
Resolving deltas:  82% (143662/175189)   
Resolving deltas:  83% (145435/175189)   
Resolving deltas:  84% (147160/175189)   
Resolving deltas:  85% (148930/175189)   
Resolving deltas:  86% (150674/175189)   
Resolving deltas:  87% (152457/175189)   
Resolving deltas:  88% (154179/175189)   
Resolving deltas:  89% (155972/175189)   
Resolving deltas:  90% (157746/175189)   
Resolving deltas:  91% (160759/175189)   
Resolving deltas:  92% (161219/175189)   
Resolving deltas:  92% (161752/175189)   
Resolving deltas:  93% (162929/175189)   
Resolving deltas:  94% (165287/175189)   
Resolvi
ng deltas:  95% (166432/175189)   
Resolving deltas:  95% (167010/175189)   
Resolving deltas:  96% (168226/175189)   
Resolving deltas:  97% (171336/175189)   
Resolving deltas: 100% (175189/175189)   
Resolving deltas: 100% (175189/175189), done.
Submodule path '.gnulib': checked out '8089c00979a5b089cff592c6b91420e595657167'
Cloning into 'src/keycodemapdb'...
remote: Enumerating objects: 297, done.        
remote: Counting objects:   0% (1/297)           
remote: Counting objects:   1% (3/297)           
remote: Counting objects:   2% (6/297)           
remote: Counting objects:   3% (9/297)           
remote: Counting objects:   4% (12/297)           
remote: Counting objects:   5% (15/297)           
remote: Counting objects:   6% (18/297)           
remote: Counting objects:   7% (21/297)           
remote: Counting objects:   8% (24/297)           
remote: Counting objects:   9% (27/297)           
remote: Counting objects:  10% (30/297)           
remote: Counting objects:  11% (33/297)           
remote: Counting objects:  12% (36/297)           
remote: Counting objects:  13% (39/297)           
remote: Counting objects:  14% (42/297)           
remote: Counting objects:  15% (45/297)           
remote: Counting objects:  16% (48/297)           
remote: Counting objects:  17% (51/297)           
remote: Counting objects:  18% (54/297)           
remote: Counting objects:  19% (57/297)           
remote: Counting objects:  20% (60/297)           
remote: Counting objects:  21% (63/297)           
remote: Counting objects:  22% (66/297)           
remote: Counting objects:  23% (69/297)           
remote: Counting objects:  24% (72/297)           
remote: Counting objects:  25% (75/297)           
remote: Counting objects:  26% (78/297)           
remote: Counting objects:  27% (81/297)           
remote: Counting objects:  28% (84/297)           
remote: Counting objects:  29% (87/297)           
remote: Counting objects:  30% (90/297)           
remote: Counting objects:  31% (93/297)           
remote: Counting objects:  32% (96/297)           
remote: Counting objects:  33% (99/297)           
remote: Counting objects:  34% (101/297)           
remote: Counting objects:  35% (104/297)           
remote: Counting objects:  36% (107/297)           
remote: Counting objects:  37% (110/297)           
remote: Counting objects:  38% (113/297)           
remote: Counting objects:  39% (116/297)           
remote
: Counting objects:  40% (119/297)           
remote: Counting objects:  41% (122/297)           
remote: Counting objects:  42% (125/297)           
remote: Counting objects:  43% (128/297)           
remote: Counting objects:  44% (131/297)           
remote: Counting objects:  45% (134/297)           
remote: Counting objects:  46% (137/297)           
remote: Counting objects:  47% (140/297)           
remote: Counting objects:  48% (143/297)           
remote: Counting objects:  49% (146/297)           
remote: Counting objects:  50% (149/297)           
remote: Counting objects:  51% (152/297)           
remote: Counting objects:  52% (155/297)           
remote: Counting objects:  53% (158/297)           
remote: Counting objects:  54% (161/297)           
remote: Counting objects:  55% (164/297)           
remote: Counting objects:  56% (167/297)           
remote: Counting objects:  57% (170/297)           
remote: Counting objects:  58% (173/297)           
remote: Counting objects:  59% (176/297)           
remote: Counting objects:  60% (179/297)           
remote: Counting objects:  61% (182/297)           
remote: Counting objects:  62% (185/297)           
remote: Counting objects:  63% (188/297)           
remote: Counting objects:  64% (191/297)           
remote: Counting objects:  65% (194/297)           
remote: Counting objects:  66% (197/297)           
remote: Counting objects:  67% (199/297)           
remote: Counting objects:  68% (202/297)           
remote: Counting objects:  69% (205/297)           
remote: Counting objects:  70% (208/297)           
remote: Counting objects:  71% (211/297)           
remote: Counting objects:  72% (214/297)           
remote: Counting objects:  73% (217/297)           
remote: Counting objects:  74% (220/297)           
remote: Counting objects:  75% (223/297)           
remote: Counting objects:  76% (226/297)           
remote: Counting objects:  77% (229/297)           
remote: Counting objects:  78% (232/297)           
remote: Counting objects: 
 79% (235/297)           
remote: Counting objects:  80% (238/297)           
remote: Counting objects:  81% (241/297)           
remote: Counting objects:  82% (244/297)           
remote: Counting objects:  83% (247/297)           
remote: Counting objects:  84% (250/297)           
remote: Counting objects:  85% (253/297)           
remote: Counting objects:  86% (256/297)           
remote: Counting objects:  87% (259/297)           
remote: Counting objects:  88% (262/297)           
remote: Counting objects:  89% (265/297)           
remote: Counting objects:  90% (268/297)           
remote: Counting objects:  91% (271/297)           
remote: Counting objects:  92% (274/297)           
remote: Counting objects:  93% (277/297)           
remote: Counting objects:  94% (280/297)           
remote: Counting objects:  95% (283/297)           
remote: Counting objects:  96% (286/297)           
remote: Counting objects:  97% (289/297)           
remote: Counting objects:  98% (292/297)           
remote: Counting objects:  99% (295/297)           
remote: Counting objects: 100% (297/297)           
remote: Counting objects: 100% (297/297), done.        
remote: Compressing objects:   0% (1/112)           
remote: Compressing objects:   1% (2/112)           
remote: Compressing objects:   2% (3/112)           
remote: Compressing objects:   3% (4/112)           
remote: Compressing objects:   4% (5/112)           
remote: Compressing objects:   5% (6/112)           
remote: Compressing objects:   6% (7/112)           
remote: Compressing objects:   7% (8/112)           
remote: Compressing objects:   8% (9/112)           
remote: Compressing objects:   9% (11/112)           
remote: Compressing objects:  10% (12/112)           
remote: Compressing objects:  11% (13/112)           
remote: Compressing objects:  12% (14/112)           
remote: Compressing objects:  13% (15/112)           
remote: Compressing objects:  14% (16/112)           
remote: Compressing objects:  15% (17/112)           
remote: Compressing objects:  16% (18/112)           
remote: Compressing objects:  17% (20/112)           
remote: Compressing objects:  18% (21/112)           
remote: Compressing objects:  19% (22/112)           
remote: Compressing objects:  20% (23/112)           
remote: Compressing objects:  21% (24/112)           
remote: Compressing objects:  22% (25/112)           
remote: Compressing objects:  23% (26/112)           
remote: Compressing objects:  24% (27/112)           
remote: Compressing objects:  25% (28/112)           
remote: Compressing objects:  26% (30/112)           
remote: Compressing objects:  27% (31/112)           
remote: Compressing objects:  28% (32/112)           
remote: Compressing objects:  29% (33/112)           
remote: Compressing objects:  30% (34/112)           
remote: Compressing objects:  31% (35/112)           
remote: Compressing objects:  32% (36/112)           
remote: Compressing objects:  33% (37/112)           
remote: Compressing objects:  34% (39/112)           
remote: Compressing objects:  35% (40/112)           
remote: Compressing objects:  36% (41/112)           
remote: Compressing objects:  37% (42/112)           
remot
e: Compressing objects:  38% (43/112)           
remote: Compressing objects:  39% (44/112)           
remote: Compressing objects:  40% (45/112)           
remote: Compressing objects:  41% (46/112)           
remote: Compressing objects:  42% (48/112)           
remote: Compressing objects:  43% (49/112)           
remote: Compressing objects:  44% (50/112)           
remote: Compressing objects:  45% (51/112)           
remote: Compressing objects:  46% (52/112)           
remote: Compressing objects:  47% (53/112)           
remote: Compressing objects:  48% (54/112)           
remote: Compressing objects:  49% (55/112)           
remote: Compressing objects:  50% (56/112)           
remote: Compressing objects:  51% (58/112)           
remote: Compressing objects:  52% (59/112)           
remote: Compressing objects:  53% (60/112)           
remote: Compressing objects:  54% (61/112)           
remote: Compressing objects:  55% (62/112)           
remote: Compressing objects:  56% (63/112)           
remote: Compressing objects:  57% (64/112)           
remote: Compressing objects:  58% (65/112)           
remote: Compressing objects:  59% (67/112)           
remote: Compressing objects:  60% (68/112)           
remote: Compressing objects:  61% (69/112)           
remote: Compressing objects:  62% (70/112)           
remote: Compressing objects:  63% (71/112)           
remote: Compressing objects:  64% (72/112)           
remote: Compressing objects:  65% (73/112)           
remote: Compressing objects:  66% (74/112)           
remote: Compressing objects:  67% (76/112)           
remote: Compressing objects:  68% (77/112)           
remote: Compressing objects:  69% (78/112)           
remote: Compressing objects:  70% (79/112)           
remote: Compressing objects:  71% (80/112)           
remote: Compressing objects:  72% (81/112)           
remote: Compressing objects:  73% (82/112)           
remote: Compressing objects:  74% (83/112)           
remote: Compressing objects:  75% (84/112)           
r
emote: Compressing objects:  76% (86/112)           
remote: Compressing objects:  77% (87/112)           
remote: Compressing objects:  78% (88/112)           
remote: Compressing objects:  79% (89/112)           
remote: Compressing objects:  80% (90/112)           
remote: Compressing objects:  81% (91/112)           
remote: Compressing objects:  82% (92/112)           
remote: Compressing objects:  83% (93/112)           
remote: Compressing objects:  84% (95/112)           
remote: Compressing objects:  85% (96/112)           
remote: Compressing objects:  86% (97/112)           
remote: Compressing objects:  87% (98/112)           
remote: Compressing objects:  88% (99/112)           
remote: Compressing objects:  89% (100/112)           
remote: Compressing objects:  90% (101/112)           
remote: Compressing objects:  91% (102/112)           
remote: Compressing objects:  92% (104/112)           
remote: Compressing objects:  93% (105/112)           
remote: Compressing objects:  94% (106/112)           
remote: Compressing objects:  95% (107/112)           
remote: Compressing objects:  96% (108/112)           
remote: Compressing objects:  97% (109/112)           
remote: Compressing objects:  98% (110/112)           
remote: Compressing objects:  99% (111/112)           
remote: Compressing objects: 100% (112/112)           
remote: Compressing objects: 100% (112/112), done.        
Receiving objects:   0% (1/297)   
Receiving objects:   1% (3/297)   
Receiving objects:   2% (6/297)   
Receiving objects:   3% (9/297)   
Receiving objects:   4% (12/297)   
Receiving objects:   5% (15/297)   
Receiving objects:   6% (18/297)   
Receiving objects:   7% (21/297)   
Receiving objects:   8% (24/297)   
Receiving objects:   9% (27/297)   
Receiving objects:  10% (30/297)   
Receiving objects:  11% (33/297)   
Receiving objects:  12% (36/297)   
Receiving objects:  13% (39/297)   
Receiving objects:  14% (42/297)   
Receiving objects:  15% (45/297)   
Receiving objects:  16% (48/297)   
Receiving objects:  17% (51/297)   
Receiving objects:  18% (54/297)   
Receiving objects:  19% (57/297)   
Receiving objects:  20% (60/297)   
Receiving objects:  21% (63/297)   
Receiving objects:  22% (66/297)   
Receiving objects:  23% (69/297)   
Receiving objects:  24% (72/297)   
Receiving objects:  25% (75/297)   
Receiving objects:  26% (78/297)   
Receiving objects:  27% (81/297)   
Receiving objects:  28% (84/297)   
Receiving objects:  29% (87/297)   
Receiving objects:  30% (90/297)   
Receiving objects:  31% (93/297)   
Receiving objects:  32% (96/297)   
Receiving objects:  33% (99/297)   
Receiving objects:  34% (101/297)   
Receiving objects:  35% (104/297)   
Receiving objects:  36% (107/297)   
Receiving objects:  37% (110/297)   
Receiving objects:  38% (113/297)   
Receiving objects:  39% (116/297)   
Receiving objects:  40% (119/297)   
Receiving objects:  41% (122/297)   
Receiving objects:  42% (125/297)   
Receiving objects:  43% (128/297)   
Receiving objects:  44% (131/297)   
Receiving objects:  45% (134/297)   
Receiving objects:  46% (137/297)   
Receiving objects:  47% (140/297)   
Receiving objects:  48% (143/297)   
Receiving objects:  49% (146/297)   
Receiving objects:  50% (149/297)   
Receiving objects:  51% (152/297)   
Receiving objects:  52% (155/297)   
Receiving objects:  53% (158/297)   
Receiving objects:  54% (161/297)   
Receiving objects:  55% (164/297)   
Receiving obje
cts:  56% (167/297)   
Receiving objects:  57% (170/297)   
Receiving objects:  58% (173/297)   
Receiving objects:  59% (176/297)   
Receiving objects:  60% (179/297)   
remote: Total 297 (delta 146), reused 280 (delta 138)        
Receiving objects:  61% (182/297)   
Receiving objects:  62% (185/297)   
Receiving objects:  63% (188/297)   
Receiving objects:  64% (191/297)   
Receiving objects:  65% (194/297)   
Receiving objects:  66% (197/297)   
Receiving objects:  67% (199/297)   
Receiving objects:  68% (202/297)   
Receiving objects:  69% (205/297)   
Receiving objects:  70% (208/297)   
Receiving objects:  71% (211/297)   
Receiving objects:  72% (214/297)   
Receiving objects:  73% (217/297)   
Receiving objects:  74% (220/297)   
Receiving objects:  75% (223/297)   
Receiving objects:  76% (226/297)   
Receiving objects:  77% (229/297)   
Receiving objects:  78% (232/297)   
Receiving objects:  79% (235/297)   
Receiving objects:  80% (238/297)   
Receiving objects:  81% (241/297)   
Receiving objects:  82% (244/297)   
Receiving objects:  83% (247/297)   
Receiving objects:  84% (250/297)   
Receiving objects:  85% (253/297)   
Receiving objects:  86% (256/297)   
Receiving objects:  87% (259/297)   
Receiving objects:  88% (262/297)   
Receiving objects:  89% (265/297)   
Receiving objects:  90% (268/297)   
Receiving objects:  91% (271/297)   
Receiving objects:  92% (274/297)   
Receiving objects:  93% (277/297)   
Receiving objects:  94% (280/297)   
Receiving objects:  95% (283/297)   
Receiving objects:  96% (286/297)   
Receiving objects:  97% (289/297)   
Receiving objects:  98% (292/297)   
Receiving objects:  99% (295/297)   
Receiving objects: 100% (297/297)   
Receiving objects: 100% (297/297), 94.17 KiB | 0 bytes/s, done.
Resolving deltas:   0% (0/146)   
Resolving deltas:   5% (8/146)   
Resolving deltas:  11% (17/146)   
Resolving deltas:  13% (20/146)   
Resolving deltas:  30% (45/146)   
Resolving deltas:  39% (58/146)   
Resolving deltas:  47% (70/146)   
Resolving deltas:  56% (82/146)   
Resolving deltas:  63% (93/146)   
Resolving deltas:  89% (131/146)   
Resolving deltas: 100% (146/146)   
Resolving deltas: 100% (146/146), done.
Submodule path 'src/keycodemapdb': checked out '16e5b0787687d8904dad2c026107409eb9bfcb95'
Running bootstrap...
./bootstrap: Bootstrapping from checked-out libvirt sources...
./bootstrap: consider installing git-merge-changelog from gnulib
./bootstrap: getting gnulib files...
running: libtoolize --install --copy
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
./bootstrap: .gnulib/gnulib-tool    --no-changelog   --aux-dir=build-aux   --doc-base=doc   --lib=libgnu   --m4-base=m4/   --source-base=gnulib/lib/   --tests-base=gnulib/tests   --local-dir=gnulib/local    --lgpl=2 --with-tests --makefile-name=gnulib.mk --avoid=pt_chown --avoid=lock-tests   --libtool --import ...
Module list with included dependencies (indented):
    absolute-header
  accept
    accept-tests
    alloca
    alloca-opt
    alloca-opt-tests
    allocator
  areadlink
    areadlink-tests
    arpa_inet
    arpa_inet-tests
    assure
  autobuild
  base64
    base64-tests
    binary-io
    binary-io-tests
  bind
    bind-tests
  bitrotate
    bitrotate-tests
    btowc
    btowc-tests
    builtin-expect
  byteswap
    byteswap-tests
  c-ctype
    c-ctype-tests
  c-strcase
    c-strcase-tests
  c-strcasestr
    c-strcasestr-tests
  calloc-posix
  canonicalize-lgpl
    canonicalize-lgpl-tests
    careadlinkat
  chown
    chown-tests
  clock-time
    cloexec
    cloexec-tests
  close
    close-tests
  configmake
  connect
    connect-tests
  count-leading-zeros
    count-leading-zeros-tests
  count-one-bits
    count-one-bits-tests
    ctype
    ctype-tests
  dirname-lgpl
    dosname
    double-slash-root
    dup
    dup-tests
    dup2
    dup2-tests
  environ
    environ-tests
    errno
    errno-tests
    error
  execinfo
    exitfail
    extensions
    extern-inline
    fatal-signal
  fclose
    fclose-tests
  fcntl
  fcntl-h
    fcntl-h-tests
    fcntl-tests
    fd-hook
  fdatasync
    fdatasync-tests
    fdopen
    fdopen-tests
    fflush
    fflush-tests
  ffs
    ffs-tests
  ffsl
    ffsl-tests
    fgetc-tests
    filename
    flexmember
    float
    float-tests
  fnmatch
    fnmatch-h
    fnmatch-h-tests
    fnmatch-tests
    fpieee
    fpucw
    fpurge
    fpurge-tests
    fputc-tests
    fread-tests
    freading
    freading-tests
    fseek
    fseek-tests
    fseeko
    fseeko-tests
    fstat
    fstat-tests
  fsync
    fsync-tests
    ftell
    ftell-tests
    ftello
    ftello-tests
    ftruncate
    ftruncate-tests
  func
    func-tests
    fwrite-tests
  getaddrinfo
    getaddrinfo-tests
  getcwd-lgpl
    getcwd-lgpl-tests
    getdelim
    getdelim-tests
    getdtablesize
    getdtablesize-tests
    getgroups
    getgroups-tests
  gethostname
    gethostname-tests
    getline
    getline-tests
  getopt-posix
    getopt-posix-tests
    getpagesize
  getpass
  getpeername
    getpeername-tests
    getprogname
    getprogname-tests
  getsockname
    getsockname-tests
    getsockopt
    getsockopt-tests
    gettext-h
  gettimeofday
    gettimeofday-tests
    getugroups
  gitlog-to-changelog
  gnumakefile
    grantpt
    grantpt-tests
    hard-locale
    havelib
    hostent
  ignore-value
    ignore-value-tests
    include_next
    inet_ntop
    inet_ntop-tests
  inet_pton
    inet_pton-tests
  intprops
    intprops-tests
    inttypes
    inttypes-incomplete
    inttypes-tests
  ioctl
    ioctl-tests
  isatty
    isatty-tests
    isblank
    isblank-tests
    isnand-nolibm
    isnand-nolibm-tests
    isnanf-nolibm
    isnanf-nolibm-tests
    isnanl-nolibm
    isnanl-nolibm-tests
    langinfo
    langinfo-tests
  largefile
  ldexp
    ldexp-tests
    libc-config
    limits-h
    limits-h-tests
  listen
    listen-tests
    localcharset
    localcharset-tests
    locale
    locale-tests
  localeconv
    localeconv-tests
    localename
    localename-tests
    localtime-buffer
    lock
    lseek
    lseek-tests
    lstat
    lstat-tests
  maintainer-makefile
    malloc-posix
    malloca
    malloca-tests
  manywarnings
    math
    math-tests
    mbrtowc
    mbrtowc-tests
    mbsinit
    mbsinit-tests
    mbsrtowcs
    mbsrtowcs-tests
    mbtowc
    memchr
    memchr-tests
  mgetgroups
    mkdir
    mkdir-tests
  mkdtemp
  mkostemp
  mkostemps
  mktempd
    mktime
    mktime-internal
    msvc-inval
    msvc-nothrow
    multiarch
    nanosleep
    nanosleep-tests
  net_if
    net_if-tests
  netdb
    netdb-tests
    netinet_in
    netinet_in-tests
    nl_langinfo
    nl_langinfo-tests
    nocrash
  nonblocking
    nonblocking-pipe-tests
    nonblocking-socket-tests
    nonblocking-tests
    open
    open-tests
  openpty
    openpty-tests
  passfd
    passfd-tests
    pathmax
    pathmax-tests
  perror
    perror-tests
  physmem
  pipe-posix
    pipe-posix-tests
  pipe2
    pipe2-tests
  poll
    poll-h
    poll-h-tests
    poll-tests
  posix-shell
    posix_openpt
    posix_openpt-tests
    posix_spawn-internal
    posix_spawn_file_actions_addclose
    posix_spawn_file_actions_addclose-tests
    posix_spawn_file_actions_adddup2
    posix_spawn_file_actions_adddup2-tests
    posix_spawn_file_actions_addopen
    posix_spawn_file_actions_addopen-tests
    posix_spawn_file_actions_destroy
    posix_spawn_file_actions_init
    posix_spawnattr_destroy
    posix_spawnattr_init
    posix_spawnattr_setflags
    posix_spawnattr_setsigmask
    posix_spawnp
    posix_spawnp-tests
  pthread
  pthread_sigmask
    pthread_sigmask-tests
    ptsname
    ptsname-tests
    ptsname_r
    ptsname_r-tests
    pty
    pty-tests
    putenv
    raise
    raise-tests
    rawmemchr
    rawmemchr-tests
    read
    read-tests
    readlink
    readlink-tests
    realloc-posix
  recv
    recv-tests
  regex
    regex-tests
    same-inode
  sched
    sched-tests
  secure_getenv
    select
    select-tests
  send
    send-tests
    servent
  setenv
    setenv-tests
    setlocale
    setlocale-tests
  setsockopt
    setsockopt-tests
    sh-filename
  sigaction
    sigaction-tests
    signal-h
    signal-h-tests
    signbit
    signbit-tests
  sigpipe
    sigpipe-tests
    sigprocmask
    sigprocmask-tests
    size_max
    sleep
    sleep-tests
    snippet/_Noreturn
    snippet/arg-nonnull
    snippet/c++defs
    snippet/unused-parameter
    snippet/warn-on-use
  snprintf
    snprintf-tests
  socket
    socketlib
    sockets
    sockets-tests
    socklen
    spawn
    spawn-tests
    ssize_t
    stat
    stat-tests
  stat-time
    stat-time-tests
    stdalign
    stdalign-tests
  stdarg
    stdbool
    stdbool-tests
    stddef
    stddef-tests
    stdint
    stdint-tests
    stdio
    stdio-tests
    stdlib
    stdlib-tests
  stpcpy
    strcase
  strchrnul
    strchrnul-tests
  strdup-posix
    streq
  strerror
    strerror-override
    strerror-tests
  strerror_r-posix
    strerror_r-posix-tests
    string
    string-tests
    strings
    strings-tests
  strndup
    strnlen
    strnlen-tests
    strnlen1
  strptime
  strsep
  strtok_r
    symlink
    symlink-tests
    sys_ioctl
    sys_ioctl-tests
    sys_select
    sys_select-tests
    sys_socket
    sys_socket-tests
  sys_stat
    sys_stat-tests
    sys_time
    sys_time-tests
    sys_types
    sys_types-tests
    sys_uio
    sys_uio-tests
    sys_utsname
    sys_utsname-tests
  sys_wait
    sys_wait-tests
    tempname
  termios
    termios-tests
    test-framework-sh
    test-framework-sh-tests
    thread
    thread-tests
    threadlib
    time
    time-tests
  time_r
  timegm
  ttyname_r
    ttyname_r-tests
  uname
    uname-tests
    unistd
    unistd-tests
    unitypes
    uniwidth/base
    uniwidth/width
    uniwidth/width-tests
    unlockpt
    unlockpt-tests
  unsetenv
    unsetenv-tests
  useless-if-before-free
  usleep
    usleep-tests
    vasnprintf
    vasnprintf-tests
  vasprintf
    vasprintf-tests
  vc-list-files
    vc-list-files-tests
  verify
    verify-tests
  vsnprintf
    vsnprintf-tests
    wait-process
  waitpid
  warnings
    wchar
    wchar-tests
    wcrtomb
    wcrtomb-tests
    wctob
    wctomb
    wctype-h
    wctype-h-tests
  wcwidth
    wcwidth-tests
    write
    write-tests
    xalloc
    xalloc-die
    xalloc-die-tests
    xalloc-oversized
    xsize
Notice from module vasprintf:
  If you are using GNU gettext version 0.16.1 or older, add the following options
  to XGETTEXT_OPTIONS in your po/Makevars:
    --flag=asprintf:2:c-format --flag=vasprintf:2:c-format
File list:
  build-aux/config.rpath
  build-aux/gitlog-to-changelog
  build-aux/mktempd
  build-aux/useless-if-before-free
  build-aux/vc-list-files
  lib/_Noreturn.h
  lib/accept.c
  lib/alloca.c
  lib/alloca.in.h
  lib/allocator.c
  lib/allocator.h
  lib/areadlink.c
  lib/areadlink.h
  lib/arg-nonnull.h
  lib/arpa_inet.in.h
  lib/asnprintf.c
  lib/asprintf.c
  lib/assure.h
  lib/base64.c
  lib/base64.h
  lib/basename-lgpl.c
  lib/binary-io.c
  lib/binary-io.h
  lib/bind.c
  lib/bitrotate.c
  lib/bitrotate.h
  lib/btowc.c
  lib/byteswap.in.h
  lib/c++defs.h
  lib/c-ctype.c
  lib/c-ctype.h
  lib/c-strcase.h
  lib/c-strcasecmp.c
  lib/c-strcasestr.c
  lib/c-strcasestr.h
  lib/c-strncasecmp.c
  lib/calloc.c
  lib/canonicalize-lgpl.c
  lib/careadlinkat.c
  lib/careadlinkat.h
  lib/cdefs.h
  lib/chown.c
  lib/cloexec.c
  lib/cloexec.h
  lib/close.c
  lib/connect.c
  lib/count-leading-zeros.c
  lib/count-leading-zeros.h
  lib/count-one-bits.c
  lib/count-one-bits.h
  lib/dirname-lgpl.c
  lib/dirname.h
  lib/dosname.h
  lib/dup2.c
  lib/errno.in.h
  lib/execinfo.c
  lib/execinfo.in.h
  lib/fchown-stub.c
  lib/fclose.c
  lib/fcntl.c
  lib/fcntl.in.h
  lib/fd-hook.c
  lib/fd-hook.h
  lib/fdatasync.c
  lib/fflush.c
  lib/ffs.c
  lib/ffsl.c
  lib/ffsl.h
  lib/filename.h
  lib/flexmember.h
  lib/float+.h
  lib/float.c
  lib/float.in.h
  lib/fnmatch.c
  lib/fnmatch.in.h
  lib/fnmatch_loop.c
  lib/fpurge.c
  lib/freading.c
  lib/freading.h
  lib/fseek.c
  lib/fseeko.c
  lib/fstat.c
  lib/fsync.c
  lib/ftell.c
  lib/ftello.c
  lib/gai_strerror.c
  lib/getaddrinfo.c
  lib/getcwd-lgpl.c
  lib/getdelim.c
  lib/getdtablesize.c
  lib/getgroups.c
  lib/gethostname.c
  lib/getline.c
  lib/getopt-cdefs.in.h
  lib/getopt-core.h
  lib/getopt-ext.h
  lib/getopt-pfx-core.h
  lib/getopt-pfx-ext.h
  lib/getopt.c
  lib/getopt.in.h
  lib/getopt1.c
  lib/getopt_int.h
  lib/getpass.c
  lib/getpass.h
  lib/getpeername.c
  lib/getsockname.c
  lib/gettext.h
  lib/gettimeofday.c
  lib/getugroups.c
  lib/getugroups.h
  lib/glthread/lock.c
  lib/glthread/lock.h
  lib/glthread/threadlib.c
  lib/hard-locale.c
  lib/hard-locale.h
  lib/ignore-value.h
  lib/inet_ntop.c
  lib/inet_pton.c
  lib/intprops.h
  lib/ioctl.c
  lib/isatty.c
  lib/itold.c
  lib/langinfo.in.h
  lib/libc-config.h
  lib/limits.in.h
  lib/listen.c
  lib/localcharset.c
  lib/localcharset.h
  lib/locale.in.h
  lib/localeconv.c
  lib/localtime-buffer.c
  lib/localtime-buffer.h
  lib/lseek.c
  lib/lstat.c
  lib/malloc.c
  lib/malloca.c
  lib/malloca.h
  lib/mbrtowc.c
  lib/mbsinit.c
  lib/mbsrtowcs-impl.h
  lib/mbsrtowcs-state.c
  lib/mbsrtowcs.c
  lib/mbtowc-impl.h
  lib/mbtowc.c
  lib/memchr.c
  lib/memchr.valgrind
  lib/mgetgroups.c
  lib/mgetgroups.h
  lib/mkdir.c
  lib/mkdtemp.c
  lib/mkostemp.c
  lib/mkostemps.c
  lib/mktime-internal.h
  lib/mktime.c
  lib/msvc-inval.c
  lib/msvc-inval.h
  lib/msvc-nothrow.c
  lib/msvc-nothrow.h
  lib/net_if.in.h
  lib/netdb.in.h
  lib/netinet_in.in.h
  lib/nl_langinfo.c
  lib/nonblocking.c
  lib/nonblocking.h
  lib/open.c
  lib/openpty.c
  lib/passfd.c
  lib/passfd.h
  lib/pathmax.h
  lib/perror.c
  lib/physmem.c
  lib/physmem.h
  lib/pipe.c
  lib/pipe2.c
  lib/poll.c
  lib/poll.in.h
  lib/posix_openpt.c
  lib/printf-args.c
  lib/printf-args.h
  lib/printf-parse.c
  lib/printf-parse.h
  lib/pthread.c
  lib/pthread.in.h
  lib/pthread_sigmask.c
  lib/pty.in.h
  lib/raise.c
  lib/rawmemchr.c
  lib/rawmemchr.valgrind
  lib/readlink.c
  lib/realloc.c
  lib/recv.c
  lib/regcomp.c
  lib/regex.c
  lib/regex.h
  lib/regex_internal.c
  lib/regex_internal.h
  lib/regexec.c
  lib/sched.in.h
  lib/secure_getenv.c
  lib/select.c
  lib/send.c
  lib/setenv.c
  lib/setsockopt.c
  lib/sig-handler.c
  lib/sig-handler.h
  lib/sigaction.c
  lib/signal.in.h
  lib/sigprocmask.c
  lib/size_max.h
  lib/sleep.c
  lib/snprintf.c
  lib/socket.c
  lib/sockets.c
  lib/sockets.h
  lib/stat-time.c
  lib/stat-time.h
  lib/stat-w32.c
  lib/stat-w32.h
  lib/stat.c
  lib/stdalign.in.h
  lib/stdarg.in.h
  lib/stdbool.in.h
  lib/stddef.in.h
  lib/stdint.in.h
  lib/stdio-impl.h
  lib/stdio-read.c
  lib/stdio-write.c
  lib/stdio.in.h
  lib/stdlib.in.h
  lib/stpcpy.c
  lib/str-two-way.h
  lib/strcasecmp.c
  lib/strchrnul.c
  lib/strchrnul.valgrind
  lib/strdup.c
  lib/streq.h
  lib/strerror-override.c
  lib/strerror-override.h
  lib/strerror.c
  lib/strerror_r.c
  lib/string.in.h
  lib/strings.in.h
  lib/stripslash.c
  lib/strncasecmp.c
  lib/strndup.c
  lib/strnlen.c
  lib/strnlen1.c
  lib/strnlen1.h
  lib/strptime.c
  lib/strsep.c
  lib/strtok_r.c
  lib/sys_ioctl.in.h
  lib/sys_select.in.h
  lib/sys_socket.c
  lib/sys_socket.in.h
  lib/sys_stat.in.h
  lib/sys_time.in.h
  lib/sys_types.in.h
  lib/sys_uio.in.h
  lib/sys_utsname.in.h
  lib/sys_wait.in.h
  lib/tempname.c
  lib/tempname.h
  lib/termios.in.h
  lib/time.in.h
  lib/time_r.c
  lib/timegm.c
  lib/ttyname_r.c
  lib/uname.c
  lib/unistd.c
  lib/unistd.in.h
  lib/unitypes.in.h
  lib/uniwidth.in.h
  lib/uniwidth/cjk.h
  lib/uniwidth/width.c
  lib/unsetenv.c
  lib/unused-parameter.h
  lib/usleep.c
  lib/vasnprintf.c
  lib/vasnprintf.h
  lib/vasprintf.c
  lib/verify.h
  lib/vsnprintf.c
  lib/w32sock.h
  lib/waitpid.c
  lib/warn-on-use.h
  lib/wchar.in.h
  lib/wcrtomb.c
  lib/wctype-h.c
  lib/wctype.in.h
  lib/wcwidth.c
  lib/xalloc-oversized.h
  lib/xsize.c
  lib/xsize.h
  m4/00gnulib.m4
  m4/__inline.m4
  m4/absolute-header.m4
  m4/alloca.m4
  m4/arpa_inet_h.m4
  m4/asm-underscore.m4
  m4/autobuild.m4
  m4/base64.m4
  m4/btowc.m4
  m4/builtin-expect.m4
  m4/byteswap.m4
  m4/calloc.m4
  m4/canonicalize.m4
  m4/chown.m4
  m4/clock_time.m4
  m4/close.m4
  m4/codeset.m4
  m4/configmake.m4
  m4/count-leading-zeros.m4
  m4/count-one-bits.m4
  m4/ctype.m4
  m4/dirname.m4
  m4/double-slash-root.m4
  m4/dup.m4
  m4/dup2.m4
  m4/eealloc.m4
  m4/environ.m4
  m4/errno_h.m4
  m4/error.m4
  m4/execinfo.m4
  m4/exponentd.m4
  m4/exponentf.m4
  m4/exponentl.m4
  m4/extensions.m4
  m4/extern-inline.m4
  m4/fatal-signal.m4
  m4/fclose.m4
  m4/fcntl-o.m4
  m4/fcntl.m4
  m4/fcntl_h.m4
  m4/fdatasync.m4
  m4/fdopen.m4
  m4/fflush.m4
  m4/ffs.m4
  m4/ffsl.m4
  m4/flexmember.m4
  m4/float_h.m4
  m4/fnmatch.m4
  m4/fnmatch_h.m4
  m4/fpieee.m4
  m4/fpurge.m4
  m4/freading.m4
  m4/fseek.m4
  m4/fseeko.m4
  m4/fstat.m4
  m4/fsync.m4
  m4/ftell.m4
  m4/ftello.m4
  m4/ftruncate.m4
  m4/func.m4
  m4/getaddrinfo.m4
  m4/getcwd.m4
  m4/getdelim.m4
  m4/getdtablesize.m4
  m4/getgroups.m4
  m4/gethostname.m4
  m4/getline.m4
  m4/getopt.m4
  m4/getpagesize.m4
  m4/getpass.m4
  m4/getprogname.m4
  m4/gettimeofday.m4
  m4/getugroups.m4
  m4/glibc21.m4
  m4/gnulib-common.m4
  m4/grantpt.m4
  m4/host-cpu-c-abi.m4
  m4/hostent.m4
  m4/include_next.m4
  m4/inet_ntop.m4
  m4/inet_pton.m4
  m4/intl-thread-locale.m4
  m4/intlmacosx.m4
  m4/intmax_t.m4
  m4/inttypes-pri.m4
  m4/inttypes.m4
  m4/inttypes_h.m4
  m4/ioctl.m4
  m4/isatty.m4
  m4/isblank.m4
  m4/isnand.m4
  m4/isnanf.m4
  m4/isnanl.m4
  m4/langinfo_h.m4
  m4/largefile.m4
  m4/lcmessage.m4
  m4/ldexp.m4
  m4/lib-ld.m4
  m4/lib-link.m4
  m4/lib-prefix.m4
  m4/libunistring-base.m4
  m4/limits-h.m4
  m4/localcharset.m4
  m4/locale-fr.m4
  m4/locale-ja.m4
  m4/locale-tr.m4
  m4/locale-zh.m4
  m4/locale_h.m4
  m4/localeconv.m4
  m4/localename.m4
  m4/localtime-buffer.m4
  m4/lock.m4
  m4/longlong.m4
  m4/lseek.m4
  m4/lstat.m4
  m4/malloc.m4
  m4/malloca.m4
  m4/manywarnings-c++.m4
  m4/manywarnings.m4
  m4/math_h.m4
  m4/mbrtowc.m4
  m4/mbsinit.m4
  m4/mbsrtowcs.m4
  m4/mbstate_t.m4
  m4/mbtowc.m4
  m4/memchr.m4
  m4/mgetgroups.m4
  m4/mkdir.m4
  m4/mkdtemp.m4
  m4/mkostemp.m4
  m4/mkostemps.m4
  m4/mktime.m4
  m4/mmap-anon.m4
  m4/mode_t.m4
  m4/msvc-inval.m4
  m4/msvc-nothrow.m4
  m4/multiarch.m4
  m4/nanosleep.m4
  m4/net_if_h.m4
  m4/netdb_h.m4
  m4/netinet_in_h.m4
  m4/nl_langinfo.m4
  m4/nocrash.m4
  m4/nonblocking.m4
  m4/off_t.m4
  m4/open-cloexec.m4
  m4/open.m4
  m4/passfd.m4
  m4/pathmax.m4
  m4/perror.m4
  m4/physmem.m4
  m4/pipe.m4
  m4/pipe2.m4
  m4/poll.m4
  m4/poll_h.m4
  m4/posix-shell.m4
  m4/posix_openpt.m4
  m4/posix_spawn.m4
  m4/printf.m4
  m4/pthread.m4
  m4/pthread_rwlock_rdlock.m4
  m4/pthread_sigmask.m4
  m4/ptsname.m4
  m4/ptsname_r.m4
  m4/pty.m4
  m4/pty_h.m4
  m4/putenv.m4
  m4/raise.m4
  m4/rawmemchr.m4
  m4/read.m4
  m4/readlink.m4
  m4/realloc.m4
  m4/regex.m4
  m4/sched_h.m4
  m4/secure_getenv.m4
  m4/select.m4
  m4/servent.m4
  m4/setenv.m4
  m4/setlocale.m4
  m4/sh-filename.m4
  m4/sig_atomic_t.m4
  m4/sigaction.m4
  m4/signal_h.m4
  m4/signalblocking.m4
  m4/signbit.m4
  m4/sigpipe.m4
  m4/size_max.m4
  m4/sleep.m4
  m4/snprintf.m4
  m4/socketlib.m4
  m4/sockets.m4
  m4/socklen.m4
  m4/sockpfaf.m4
  m4/spawn_h.m4
  m4/ssize_t.m4
  m4/stat-time.m4
  m4/stat.m4
  m4/stdalign.m4
  m4/stdarg.m4
  m4/stdbool.m4
  m4/stddef_h.m4
  m4/stdint.m4
  m4/stdint_h.m4
  m4/stdio_h.m4
  m4/stdlib_h.m4
  m4/stpcpy.m4
  m4/strcase.m4
  m4/strchrnul.m4
  m4/strdup.m4
  m4/strerror.m4
  m4/strerror_r.m4
  m4/string_h.m4
  m4/strings_h.m4
  m4/strndup.m4
  m4/strnlen.m4
  m4/strptime.m4
  m4/strsep.m4
  m4/strtok_r.m4
  m4/symlink.m4
  m4/sys_ioctl_h.m4
  m4/sys_select_h.m4
  m4/sys_socket_h.m4
  m4/sys_stat_h.m4
  m4/sys_time_h.m4
  m4/sys_types_h.m4
  m4/sys_uio_h.m4
  m4/sys_utsname_h.m4
  m4/sys_wait_h.m4
  m4/tempname.m4
  m4/termios_h.m4
  m4/thread.m4
  m4/threadlib.m4
  m4/time_h.m4
  m4/time_r.m4
  m4/timegm.m4
  m4/tm_gmtoff.m4
  m4/ttyname_r.m4
  m4/uname.m4
  m4/ungetc.m4
  m4/unistd_h.m4
  m4/unlockpt.m4
  m4/usleep.m4
  m4/vasnprintf.m4
  m4/vasprintf.m4
  m4/vsnprintf.m4
  m4/wait-process.m4
  m4/waitpid.m4
  m4/warn-on-use.m4
  m4/warnings.m4
  m4/wchar_h.m4
  m4/wchar_t.m4
  m4/wcrtomb.m4
  m4/wctob.m4
  m4/wctomb.m4
  m4/wctype_h.m4
  m4/wcwidth.m4
  m4/wint_t.m4
  m4/write.m4
  m4/xalloc.m4
  m4/xsize.m4
  tests/infinity.h
  tests/init.sh
  tests/macros.h
  tests/minus-zero.h
  tests/nan.h
  tests/nap.h
  tests/null-ptr.h
  tests/randomd.c
  tests/signature.h
  tests/socket-client.h
  tests/socket-server.h
  tests/test-accept.c
  tests/test-alloca-opt.c
  tests/test-areadlink.c
  tests/test-areadlink.h
  tests/test-arpa_inet.c
  tests/test-base64.c
  tests/test-binary-io.c
  tests/test-binary-io.sh
  tests/test-bind.c
  tests/test-bitrotate.c
  tests/test-btowc.c
  tests/test-btowc1.sh
  tests/test-btowc2.sh
  tests/test-byteswap.c
  tests/test-c-ctype.c
  tests/test-c-strcase.sh
  tests/test-c-strcasecmp.c
  tests/test-c-strcasestr.c
  tests/test-c-strncasecmp.c
  tests/test-canonicalize-lgpl.c
  tests/test-chown.c
  tests/test-chown.h
  tests/test-cloexec.c
  tests/test-close.c
  tests/test-connect.c
  tests/test-count-leading-zeros.c
  tests/test-count-one-bits.c
  tests/test-ctype.c
  tests/test-dup.c
  tests/test-dup2.c
  tests/test-environ.c
  tests/test-errno.c
  tests/test-fclose.c
  tests/test-fcntl-h.c
  tests/test-fcntl.c
  tests/test-fdatasync.c
  tests/test-fdopen.c
  tests/test-fflush.c
  tests/test-fflush2.c
  tests/test-fflush2.sh
  tests/test-ffs.c
  tests/test-ffsl.c
  tests/test-fgetc.c
  tests/test-float.c
  tests/test-fnmatch-h.c
  tests/test-fnmatch.c
  tests/test-fpurge.c
  tests/test-fputc.c
  tests/test-fread.c
  tests/test-freading.c
  tests/test-fseek.c
  tests/test-fseek.sh
  tests/test-fseek2.sh
  tests/test-fseeko.c
  tests/test-fseeko.sh
  tests/test-fseeko2.sh
  tests/test-fseeko3.c
  tests/test-fseeko3.sh
  tests/test-fseeko4.c
  tests/test-fseeko4.sh
  tests/test-fstat.c
  tests/test-fsync.c
  tests/test-ftell.c
  tests/test-ftell.sh
  tests/test-ftell2.sh
  tests/test-ftell3.c
  tests/test-ftello.c
  tests/test-ftello.sh
  tests/test-ftello2.sh
  tests/test-ftello3.c
  tests/test-ftello4.c
  tests/test-ftello4.sh
  tests/test-ftruncate.c
  tests/test-ftruncate.sh
  tests/test-func.c
  tests/test-fwrite.c
  tests/test-getaddrinfo.c
  tests/test-getcwd-lgpl.c
  tests/test-getdelim.c
  tests/test-getdtablesize.c
  tests/test-getgroups.c
  tests/test-gethostname.c
  tests/test-getline.c
  tests/test-getopt-main.h
  tests/test-getopt-posix.c
  tests/test-getopt.h
  tests/test-getpeername.c
  tests/test-getprogname.c
  tests/test-getsockname.c
  tests/test-getsockopt.c
  tests/test-gettimeofday.c
  tests/test-grantpt.c
  tests/test-ignore-value.c
  tests/test-inet_ntop.c
  tests/test-inet_pton.c
  tests/test-init.sh
  tests/test-intprops.c
  tests/test-inttypes.c
  tests/test-ioctl.c
  tests/test-isatty.c
  tests/test-isblank.c
  tests/test-isnand-nolibm.c
  tests/test-isnand.h
  tests/test-isnanf-nolibm.c
  tests/test-isnanf.h
  tests/test-isnanl-nolibm.c
  tests/test-isnanl.h
  tests/test-langinfo.c
  tests/test-ldexp.c
  tests/test-ldexp.h
  tests/test-limits-h.c
  tests/test-listen.c
  tests/test-localcharset.c
  tests/test-locale.c
  tests/test-localeconv.c
  tests/test-localename.c
  tests/test-lseek.c
  tests/test-lseek.sh
  tests/test-lstat.c
  tests/test-lstat.h
  tests/test-malloca.c
  tests/test-math.c
  tests/test-mbrtowc-w32-1.sh
  tests/test-mbrtowc-w32-2.sh
  tests/test-mbrtowc-w32-3.sh
  tests/test-mbrtowc-w32-4.sh
  tests/test-mbrtowc-w32-5.sh
  tests/test-mbrtowc-w32.c
  tests/test-mbrtowc.c
  tests/test-mbrtowc1.sh
  tests/test-mbrtowc2.sh
  tests/test-mbrtowc3.sh
  tests/test-mbrtowc4.sh
  tests/test-mbrtowc5.sh
  tests/test-mbsinit.c
  tests/test-mbsinit.sh
  tests/test-mbsrtowcs.c
  tests/test-mbsrtowcs1.sh
  tests/test-mbsrtowcs2.sh
  tests/test-mbsrtowcs3.sh
  tests/test-mbsrtowcs4.sh
  tests/test-memchr.c
  tests/test-mkdir.c
  tests/test-mkdir.h
  tests/test-nanosleep.c
  tests/test-net_if.c
  tests/test-netdb.c
  tests/test-netinet_in.c
  tests/test-nl_langinfo.c
  tests/test-nl_langinfo.sh
  tests/test-nonblocking-misc.h
  tests/test-nonblocking-pipe-child.c
  tests/test-nonblocking-pipe-main.c
  tests/test-nonblocking-pipe.h
  tests/test-nonblocking-pipe.sh
  tests/test-nonblocking-reader.h
  tests/test-nonblocking-socket-child.c
  tests/test-nonblocking-socket-main.c
  tests/test-nonblocking-socket.h
  tests/test-nonblocking-socket.sh
  tests/test-nonblocking-writer.h
  tests/test-nonblocking.c
  tests/test-open.c
  tests/test-open.h
  tests/test-openpty.c
  tests/test-passfd.c
  tests/test-pathmax.c
  tests/test-perror.c
  tests/test-perror.sh
  tests/test-perror2.c
  tests/test-pipe.c
  tests/test-pipe2.c
  tests/test-poll-h.c
  tests/test-poll.c
  tests/test-posix_openpt.c
  tests/test-posix_spawn1.c
  tests/test-posix_spawn1.in.sh
  tests/test-posix_spawn2.c
  tests/test-posix_spawn2.in.sh
  tests/test-posix_spawn_file_actions_addclose.c
  tests/test-posix_spawn_file_actions_adddup2.c
  tests/test-posix_spawn_file_actions_addopen.c
  tests/test-pthread_sigmask1.c
  tests/test-pthread_sigmask2.c
  tests/test-ptsname.c
  tests/test-ptsname_r.c
  tests/test-raise.c
  tests/test-rawmemchr.c
  tests/test-read.c
  tests/test-readlink.c
  tests/test-readlink.h
  tests/test-recv.c
  tests/test-regex.c
  tests/test-sched.c
  tests/test-select-fd.c
  tests/test-select-in.sh
  tests/test-select-out.sh
  tests/test-select-stdin.c
  tests/test-select.c
  tests/test-select.h
  tests/test-send.c
  tests/test-setenv.c
  tests/test-setlocale1.c
  tests/test-setlocale1.sh
  tests/test-setlocale2.c
  tests/test-setlocale2.sh
  tests/test-setsockopt.c
  tests/test-sigaction.c
  tests/test-signal-h.c
  tests/test-signbit.c
  tests/test-sigpipe.c
  tests/test-sigpipe.sh
  tests/test-sigprocmask.c
  tests/test-sleep.c
  tests/test-snprintf.c
  tests/test-sockets.c
  tests/test-spawn.c
  tests/test-stat-time.c
  tests/test-stat.c
  tests/test-stat.h
  tests/test-stdalign.c
  tests/test-stdbool.c
  tests/test-stddef.c
  tests/test-stdint.c
  tests/test-stdio.c
  tests/test-stdlib.c
  tests/test-strchrnul.c
  tests/test-strerror.c
  tests/test-strerror_r.c
  tests/test-string.c
  tests/test-strings.c
  tests/test-strnlen.c
  tests/test-symlink.c
  tests/test-symlink.h
  tests/test-sys_ioctl.c
  tests/test-sys_select.c
  tests/test-sys_socket.c
  tests/test-sys_stat.c
  tests/test-sys_time.c
  tests/test-sys_types.c
  tests/test-sys_uio.c
  tests/test-sys_utsname.c
  tests/test-sys_wait.c
  tests/test-sys_wait.h
  tests/test-termios.c
  tests/test-thread_create.c
  tests/test-thread_self.c
  tests/test-time.c
  tests/test-ttyname_r.c
  tests/test-uname.c
  tests/test-unistd.c
  tests/test-unlockpt.c
  tests/test-unsetenv.c
  tests/test-usleep.c
  tests/test-vasnprintf.c
  tests/test-vasprintf.c
  tests/test-vc-list-files-cvs.sh
  tests/test-vc-list-files-git.sh
  tests/test-verify-try.c
  tests/test-verify.c
  tests/test-verify.sh
  tests/test-vsnprintf.c
  tests/test-wchar.c
  tests/test-wcrtomb-w32-1.sh
  tests/test-wcrtomb-w32-2.sh
  tests/test-wcrtomb-w32-3.sh
  tests/test-wcrtomb-w32-4.sh
  tests/test-wcrtomb-w32-5.sh
  tests/test-wcrtomb-w32.c
  tests/test-wcrtomb.c
  tests/test-wcrtomb.sh
  tests/test-wctype-h.c
  tests/test-wcwidth.c
  tests/test-write.c
  tests/test-xalloc-die.c
  tests/test-xalloc-die.sh
  tests/uniwidth/test-uc_width.c
  tests/uniwidth/test-uc_width2.c
  tests/uniwidth/test-uc_width2.sh
  tests/zerosize-ptr.h
  lib/_Noreturn.h -> tests/_Noreturn.h
  lib/arg-nonnull.h -> tests/arg-nonnull.h
  lib/c++defs.h -> tests/c++defs.h
  lib/ctype.in.h -> tests/ctype.in.h
  lib/dup.c -> tests/dup.c
  lib/error.c -> tests/error.c
  lib/error.h -> tests/error.h
  lib/exitfail.c -> tests/exitfail.c
  lib/exitfail.h -> tests/exitfail.h
  lib/fatal-signal.c -> tests/fatal-signal.c
  lib/fatal-signal.h -> tests/fatal-signal.h
  lib/fdopen.c -> tests/fdopen.c
  lib/float+.h -> tests/float+.h
  lib/fpucw.h -> tests/fpucw.h
  lib/ftruncate.c -> tests/ftruncate.c
  lib/getpagesize.c -> tests/getpagesize.c
  lib/getprogname.c -> tests/getprogname.c
  lib/getprogname.h -> tests/getprogname.h
  lib/getsockopt.c -> tests/getsockopt.c
  lib/glthread/thread.c -> tests/glthread/thread.c
  lib/glthread/thread.h -> tests/glthread/thread.h
  lib/grantpt.c -> tests/grantpt.c
  lib/inttypes.in.h -> tests/inttypes.in.h
  lib/isblank.c -> tests/isblank.c
  lib/isnan.c -> tests/isnan.c
  lib/isnand-nolibm.h -> tests/isnand-nolibm.h
  lib/isnand.c -> tests/isnand.c
  lib/isnanf-nolibm.h -> tests/isnanf-nolibm.h
  lib/isnanf.c -> tests/isnanf.c
  lib/isnanl-nolibm.h -> tests/isnanl-nolibm.h
  lib/isnanl.c -> tests/isnanl.c
  lib/localename-table.c -> tests/localename-table.c
  lib/localename-table.h -> tests/localename-table.h
  lib/localename.c -> tests/localename.c
  lib/localename.h -> tests/localename.h
  lib/math.c -> tests/math.c
  lib/math.in.h -> tests/math.in.h
  lib/nanosleep.c -> tests/nanosleep.c
  lib/ptsname.c -> tests/ptsname.c
  lib/ptsname_r.c -> tests/ptsname_r.c
  lib/pty-private.h -> tests/pty-private.h
  lib/putenv.c -> tests/putenv.c
  lib/read.c -> tests/read.c
  lib/same-inode.h -> tests/same-inode.h
  lib/setlocale.c -> tests/setlocale.c
  lib/signbitd.c -> tests/signbitd.c
  lib/signbitf.c -> tests/signbitf.c
  lib/signbitl.c -> tests/signbitl.c
  lib/spawn.in.h -> tests/spawn.in.h
  lib/spawn_faction_addclose.c -> tests/spawn_faction_addclose.c
  lib/spawn_faction_adddup2.c -> tests/spawn_faction_adddup2.c
  lib/spawn_faction_addopen.c -> tests/spawn_faction_addopen.c
  lib/spawn_faction_destroy.c -> tests/spawn_faction_destroy.c
  lib/spawn_faction_init.c -> tests/spawn_faction_init.c
  lib/spawn_int.h -> tests/spawn_int.h
  lib/spawnattr_destroy.c -> tests/spawnattr_destroy.c
  lib/spawnattr_init.c -> tests/spawnattr_init.c
  lib/spawnattr_setflags.c -> tests/spawnattr_setflags.c
  lib/spawnattr_setsigmask.c -> tests/spawnattr_setsigmask.c
  lib/spawni.c -> tests/spawni.c
  lib/spawnp.c -> tests/spawnp.c
  lib/symlink.c -> tests/symlink.c
  lib/unlockpt.c -> tests/unlockpt.c
  lib/unused-parameter.h -> tests/unused-parameter.h
  lib/w32sock.h -> tests/w32sock.h
  lib/wait-process.c -> tests/wait-process.c
  lib/wait-process.h -> tests/wait-process.h
  lib/warn-on-use.h -> tests/warn-on-use.h
  lib/wctob.c -> tests/wctob.c
  lib/wctomb-impl.h -> tests/wctomb-impl.h
  lib/wctomb.c -> tests/wctomb.c
  lib/write.c -> tests/write.c
  lib/xalloc-die.c -> tests/xalloc-die.c
  lib/xalloc.h -> tests/xalloc.h
  lib/xmalloc.c -> tests/xmalloc.c
  top/GNUmakefile
  top/maint.mk
Creating directory ./gnulib/lib/glthread
Creating directory ./gnulib/lib/uniwidth
Creating directory ./gnulib/tests/glthread
Creating directory ./gnulib/tests/uniwidth
Copying file GNUmakefile
Copying file build-aux/config.rpath
Copying file build-aux/gitlog-to-changelog
Copying file build-aux/mktempd
Copying file build-aux/useless-if-before-free
Copying file build-aux/vc-list-files
Copying file gnulib/lib/_Noreturn.h
Copying file gnulib/lib/accept.c
Copying file gnulib/lib/alloca.c
Copying file gnulib/lib/alloca.in.h
Copying file gnulib/lib/allocator.c
Copying file gnulib/lib/allocator.h
Copying file gnulib/lib/areadlink.c
Copying file gnulib/lib/areadlink.h
Copying file gnulib/lib/arg-nonnull.h
Copying file gnulib/lib/arpa_inet.in.h
Copying file gnulib/lib/asnprintf.c
Copying file gnulib/lib/asprintf.c
Copying file gnulib/lib/assure.h
Copying file gnulib/lib/base64.c
Copying file gnulib/lib/base64.h
Copying file gnulib/lib/basename-lgpl.c
Copying file gnulib/lib/binary-io.c
Copying file gnulib/lib/binary-io.h
Copying file gnulib/lib/bind.c
Copying file gnulib/lib/bitrotate.c
Copying file gnulib/lib/bitrotate.h
Copying file gnulib/lib/btowc.c
Copying file gnulib/lib/byteswap.in.h
Copying file gnulib/lib/c++defs.h
Copying file gnulib/lib/c-ctype.c
Copying file gnulib/lib/c-ctype.h
Copying file gnulib/lib/c-strcase.h
Copying file gnulib/lib/c-strcasecmp.c
Copying file gnulib/lib/c-strcasestr.c
Copying file gnulib/lib/c-strcasestr.h
Copying file gnulib/lib/c-strncasecmp.c
Copying file gnulib/lib/calloc.c
Copying file gnulib/lib/canonicalize-lgpl.c
Copying file gnulib/lib/careadlinkat.c
Copying file gnulib/lib/careadlinkat.h
Copying file gnulib/lib/cdefs.h
Copying file gnulib/lib/chown.c
Copying file gnulib/lib/cloexec.c
Copying file gnulib/lib/cloexec.h
Copying file gnulib/lib/close.c
Copying file gnulib/lib/connect.c
Copying file gnulib/lib/count-leading-zeros.c
Copying file gnulib/lib/count-leading-zeros.h
Copying file gnulib/lib/count-one-bits.c
Copying file gnulib/lib/count-one-bits.h
Copying file gnulib/lib/dirname-lgpl.c
Copying file gnulib/lib/dirname.h
Copying file gnulib/lib/dosname.h
Copying file gnulib/lib/dup2.c
Copying file gnulib/lib/errno.in.h
Copying file gnulib/lib/execinfo.c
Copying file gnulib/lib/execinfo.in.h
Copying file gnulib/lib/fchown-stub.c
Copying file gnulib/lib/fclose.c
Copying file gnulib/lib/fcntl.c
Copying file gnulib/lib/fcntl.in.h
Copying file gnulib/lib/fd-hook.c
Copying file gnulib/lib/fd-hook.h
Copying file gnulib/lib/fdatasync.c
Copying file gnulib/lib/fflush.c
Copying file gnulib/lib/ffs.c
Copying file gnulib/lib/ffsl.c
Copying file gnulib/lib/ffsl.h
Copying file gnulib/lib/filename.h
Copying file gnulib/lib/flexmember.h
Copying file gnulib/lib/float+.h
Copying file gnulib/lib/float.c
Copying file gnulib/lib/float.in.h
Copying file gnulib/lib/fnmatch.c
Copying file gnulib/lib/fnmatch.in.h
Copying file gnulib/lib/fnmatch_loop.c
Copying file gnulib/lib/fpurge.c
Copying file gnulib/lib/freading.c
Copying file gnulib/lib/freading.h
Copying file gnulib/lib/fseek.c
Copying file gnulib/lib/fseeko.c
Copying file gnulib/lib/fstat.c
Copying file gnulib/lib/fsync.c
Copying file gnulib/lib/ftell.c
Copying file gnulib/lib/ftello.c
Copying file gnulib/lib/gai_strerror.c
Copying file gnulib/lib/getaddrinfo.c
Copying file gnulib/lib/getcwd-lgpl.c
Copying file gnulib/lib/getdelim.c
Copying file gnulib/lib/getdtablesize.c
Copying file gnulib/lib/getgroups.c
Copying file gnulib/lib/gethostname.c
Copying file gnulib/lib/getline.c
Copying file gnulib/lib/getopt-cdefs.in.h
Copying file gnulib/lib/getopt-core.h
Copying file gnulib/lib/getopt-ext.h
Copying file gnulib/lib/getopt-pfx-core.h
Copying file gnulib/lib/getopt-pfx-ext.h
Copying file gnulib/lib/getopt.c
Copying file gnulib/lib/getopt.in.h
Copying file gnulib/lib/getopt1.c
Copying file gnulib/lib/getopt_int.h
Copying file gnulib/lib/getpass.c
Copying file gnulib/lib/getpass.h
Copying file gnulib/lib/getpeername.c
Copying file gnulib/lib/getsockname.c
Copying file gnulib/lib/gettext.h
Copying file gnulib/lib/gettimeofday.c
Copying file gnulib/lib/getugroups.c
Copying file gnulib/lib/getugroups.h
Copying file gnulib/lib/glthread/lock.c
Copying file gnulib/lib/glthread/lock.h
Copying file gnulib/lib/glthread/threadlib.c
Copying file gnulib/lib/hard-locale.c
Copying file gnulib/lib/hard-locale.h
Copying file gnulib/lib/ignore-value.h
Copying file gnulib/lib/inet_ntop.c
Copying file gnulib/lib/inet_pton.c
Copying file gnulib/lib/intprops.h
Copying file gnulib/lib/ioctl.c
Copying file gnulib/lib/isatty.c
Copying file gnulib/lib/itold.c
Copying file gnulib/lib/langinfo.in.h
Copying file gnulib/lib/libc-config.h
Copying file gnulib/lib/limits.in.h
Copying file gnulib/lib/listen.c
Copying file gnulib/lib/localcharset.c
Copying file gnulib/lib/localcharset.h
Copying file gnulib/lib/locale.in.h
Copying file gnulib/lib/localeconv.c
Copying file gnulib/lib/localtime-buffer.c
Copying file gnulib/lib/localtime-buffer.h
Copying file gnulib/lib/lseek.c
Copying file gnulib/lib/lstat.c
Copying file gnulib/lib/malloc.c
Copying file gnulib/lib/malloca.c
Copying file gnulib/lib/malloca.h
Copying file gnulib/lib/mbrtowc.c
Copying file gnulib/lib/mbsinit.c
Copying file gnulib/lib/mbsrtowcs-impl.h
Copying file gnulib/lib/mbsrtowcs-state.c
Copying file gnulib/lib/mbsrtowcs.c
Copying file gnulib/lib/mbtowc-impl.h
Copying file gnulib/lib/mbtowc.c
Copying file gnulib/lib/memchr.c
Copying file gnulib/lib/memchr.valgrind
Copying file gnulib/lib/mgetgroups.c
Copying file gnulib/lib/mgetgroups.h
Copying file gnulib/lib/mkdir.c
Copying file gnulib/lib/mkdtemp.c
Copying file gnulib/lib/mkostemp.c
Copying file gnulib/lib/mkostemps.c
Copying file gnulib/lib/mktime-internal.h
Copying file gnulib/lib/mktime.c
Copying file gnulib/lib/msvc-inval.c
Copying file gnulib/lib/msvc-inval.h
Copying file gnulib/lib/msvc-nothrow.c
Copying file gnulib/lib/msvc-nothrow.h
Copying file gnulib/lib/net_if.in.h
Copying file gnulib/lib/netdb.in.h
Copying file gnulib/lib/netinet_in.in.h
Copying file gnulib/lib/nl_langinfo.c
Copying file gnulib/lib/nonblocking.c
Copying file gnulib/lib/nonblocking.h
Copying file gnulib/lib/open.c
Copying file gnulib/lib/openpty.c
Copying file gnulib/lib/passfd.c
Copying file gnulib/lib/passfd.h
Copying file gnulib/lib/pathmax.h
Copying file gnulib/lib/perror.c
Copying file gnulib/lib/physmem.c
Copying file gnulib/lib/physmem.h
Copying file gnulib/lib/pipe.c
Copying file gnulib/lib/pipe2.c
Copying file gnulib/lib/poll.c
Copying file gnulib/lib/poll.in.h
Copying file gnulib/lib/posix_openpt.c
Copying file gnulib/lib/printf-args.c
Copying file gnulib/lib/printf-args.h
Copying file gnulib/lib/printf-parse.c
Copying file gnulib/lib/printf-parse.h
Copying file gnulib/lib/pthread.c
Copying file gnulib/lib/pthread.in.h
Copying file gnulib/lib/pthread_sigmask.c
Copying file gnulib/lib/pty.in.h
Copying file gnulib/lib/raise.c
Copying file gnulib/lib/rawmemchr.c
Copying file gnulib/lib/rawmemchr.valgrind
Copying file gnulib/lib/readlink.c
Copying file gnulib/lib/realloc.c
Copying file gnulib/lib/recv.c
Copying file gnulib/lib/regcomp.c
Copying file gnulib/lib/regex.c
Copying file gnulib/lib/regex.h
Copying file gnulib/lib/regex_internal.c
Copying file gnulib/lib/regex_internal.h
Copying file gnulib/lib/regexec.c
Copying file gnulib/lib/sched.in.h
Copying file gnulib/lib/secure_getenv.c
Copying file gnulib/lib/select.c
Copying file gnulib/lib/send.c
Copying file gnulib/lib/setenv.c
Copying file gnulib/lib/setsockopt.c
Copying file gnulib/lib/sig-handler.c
Copying file gnulib/lib/sig-handler.h
Copying file gnulib/lib/sigaction.c
Copying file gnulib/lib/signal.in.h
Copying file gnulib/lib/sigprocmask.c
Copying file gnulib/lib/size_max.h
Copying file gnulib/lib/sleep.c
Copying file gnulib/lib/snprintf.c
Copying file gnulib/lib/socket.c
Copying file gnulib/lib/sockets.c
Copying file gnulib/lib/sockets.h
Copying file gnulib/lib/stat-time.c
Copying file gnulib/lib/stat-time.h
Copying file gnulib/lib/stat-w32.c
Copying file gnulib/lib/stat-w32.h
Copying file gnulib/lib/stat.c
Copying file gnulib/lib/stdalign.in.h
Copying file gnulib/lib/stdarg.in.h
Copying file gnulib/lib/stdbool.in.h
Copying file gnulib/lib/stddef.in.h
Copying file gnulib/lib/stdint.in.h
Copying file gnulib/lib/stdio-impl.h
Copying file gnulib/lib/stdio-read.c
Copying file gnulib/lib/stdio-write.c
Copying file gnulib/lib/stdio.in.h
Copying file gnulib/lib/stdlib.in.h
Copying file gnulib/lib/stpcpy.c
Copying file gnulib/lib/str-two-way.h
Copying file gnulib/lib/strcasecmp.c
Copying file gnulib/lib/strchrnul.c
Copying file gnulib/lib/strchrnul.valgrind
Copying file gnulib/lib/strdup.c
Copying file gnulib/lib/streq.h
Copying file gnulib/lib/strerror-override.c
Copying file gnulib/lib/strerror-override.h
Copying file gnulib/lib/strerror.c
Copying file gnulib/lib/strerror_r.c
Copying file gnulib/lib/string.in.h
Copying file gnulib/lib/strings.in.h
Copying file gnulib/lib/stripslash.c
Copying file gnulib/lib/strncasecmp.c
Copying file gnulib/lib/strndup.c
Copying file gnulib/lib/strnlen.c
Copying file gnulib/lib/strnlen1.c
Copying file gnulib/lib/strnlen1.h
Copying file gnulib/lib/strptime.c
Copying file gnulib/lib/strsep.c
Copying file gnulib/lib/strtok_r.c
Copying file gnulib/lib/sys_ioctl.in.h
Copying file gnulib/lib/sys_select.in.h
Copying file gnulib/lib/sys_socket.c
Copying file gnulib/lib/sys_socket.in.h
Copying file gnulib/lib/sys_stat.in.h
Copying file gnulib/lib/sys_time.in.h
Copying file gnulib/lib/sys_types.in.h
Copying file gnulib/lib/sys_uio.in.h
Copying file gnulib/lib/sys_utsname.in.h
Copying file gnulib/lib/sys_wait.in.h
Copying file gnulib/lib/tempname.c
Copying file gnulib/lib/tempname.h
Copying file gnulib/lib/termios.in.h
Copying file gnulib/lib/time.in.h
Copying file gnulib/lib/time_r.c
Copying file gnulib/lib/timegm.c
Copying file gnulib/lib/ttyname_r.c
Copying file gnulib/lib/uname.c
Copying file gnulib/lib/unistd.c
Copying file gnulib/lib/unistd.in.h
Copying file gnulib/lib/unitypes.in.h
Copying file gnulib/lib/uniwidth.in.h
Copying file gnulib/lib/uniwidth/cjk.h
Copying file gnulib/lib/uniwidth/width.c
Copying file gnulib/lib/unsetenv.c
Copying file gnulib/lib/unused-parameter.h
Copying file gnulib/lib/usleep.c
Copying file gnulib/lib/vasnprintf.c
Copying file gnulib/lib/vasnprintf.h
Copying file gnulib/lib/vasprintf.c
Copying file gnulib/lib/verify.h
Copying file gnulib/lib/vsnprintf.c
Copying file gnulib/lib/w32sock.h
Copying file gnulib/lib/waitpid.c
Copying file gnulib/lib/warn-on-use.h
Copying file gnulib/lib/wchar.in.h
Copying file gnulib/lib/wcrtomb.c
Copying file gnulib/lib/wctype-h.c
Copying file gnulib/lib/wctype.in.h
Copying file gnulib/lib/wcwidth.c
Copying file gnulib/lib/xalloc-oversized.h
Copying file gnulib/lib/xsize.c
Copying file gnulib/lib/xsize.h
Copying file gnulib/tests/_Noreturn.h
Copying file gnulib/tests/arg-nonnull.h
Copying file gnulib/tests/c++defs.h
Copying file gnulib/tests/ctype.in.h
Copying file gnulib/tests/dup.c
Copying file gnulib/tests/error.c
Copying file gnulib/tests/error.h
Copying file gnulib/tests/exitfail.c
Copying file gnulib/tests/exitfail.h
Copying file gnulib/tests/fatal-signal.c
Copying file gnulib/tests/fatal-signal.h
Copying file gnulib/tests/fdopen.c
Copying file gnulib/tests/float+.h
Copying file gnulib/tests/fpucw.h
Copying file gnulib/tests/ftruncate.c
Copying file gnulib/tests/getpagesize.c
Copying file gnulib/tests/getprogname.c
Copying file gnulib/tests/getprogname.h
Copying file gnulib/tests/getsockopt.c
Copying file gnulib/tests/glthread/thread.c
Copying file gnulib/tests/glthread/thread.h
Copying file gnulib/tests/grantpt.c
Copying file gnulib/tests/infinity.h
Copying file gnulib/tests/init.sh
Copying file gnulib/tests/inttypes.in.h
Copying file gnulib/tests/isblank.c
Copying file gnulib/tests/isnan.c
Copying file gnulib/tests/isnand-nolibm.h
Copying file gnulib/tests/isnand.c
Copying file gnulib/tests/isnanf-nolibm.h
Copying file gnulib/tests/isnanf.c
Copying file gnulib/tests/isnanl-nolibm.h
Copying file gnulib/tests/isnanl.c
Copying file gnulib/tests/localename-table.c
Copying file gnulib/tests/localename-table.h
Copying file gnulib/tests/localename.c
Copying file gnulib/tests/localename.h
Copying file gnulib/tests/macros.h
Copying file gnulib/tests/math.c
Copying file gnulib/tests/math.in.h
Copying file gnulib/tests/minus-zero.h
Copying file gnulib/tests/nan.h
Copying file gnulib/tests/nanosleep.c
Copying file gnulib/tests/nap.h
Copying file gnulib/tests/null-ptr.h
Copying file gnulib/tests/ptsname.c
Copying file gnulib/tests/ptsname_r.c
Copying file gnulib/tests/pty-private.h
Copying file gnulib/tests/putenv.c
Copying file gnulib/tests/randomd.c
Copying file gnulib/tests/read.c
Copying file gnulib/tests/same-inode.h
Copying file gnulib/tests/setlocale.c
Copying file gnulib/tests/signature.h
Copying file gnulib/tests/signbitd.c
Copying file gnulib/tests/signbitf.c
Copying file gnulib/tests/signbitl.c
Copying file gnulib/tests/socket-client.h
Copying file gnulib/tests/socket-server.h
Copying file gnulib/tests/spawn.in.h
Copying file gnulib/tests/spawn_faction_addclose.c
Copying file gnulib/tests/spawn_faction_adddup2.c
Copying file gnulib/tests/spawn_faction_addopen.c
Copying file gnulib/tests/spawn_faction_destroy.c
Copying file gnulib/tests/spawn_faction_init.c
Copying file gnulib/tests/spawn_int.h
Copying file gnulib/tests/spawnattr_destroy.c
Copying file gnulib/tests/spawnattr_init.c
Copying file gnulib/tests/spawnattr_setflags.c
Copying file gnulib/tests/spawnattr_setsigmask.c
Copying file gnulib/tests/spawni.c
Copying file gnulib/tests/spawnp.c
Copying file gnulib/tests/symlink.c
Copying file gnulib/tests/test-accept.c
Copying file gnulib/tests/test-alloca-opt.c
Copying file gnulib/tests/test-areadlink.c
Copying file gnulib/tests/test-areadlink.h
Copying file gnulib/tests/test-arpa_inet.c
Copying file gnulib/tests/test-base64.c
Copying file gnulib/tests/test-binary-io.c
Copying file gnulib/tests/test-binary-io.sh
Copying file gnulib/tests/test-bind.c
Copying file gnulib/tests/test-bitrotate.c
Copying file gnulib/tests/test-btowc.c
Copying file gnulib/tests/test-btowc1.sh
Copying file gnulib/tests/test-btowc2.sh
Copying file gnulib/tests/test-byteswap.c
Copying file gnulib/tests/test-c-ctype.c
Copying file gnulib/tests/test-c-strcase.sh
Copying file gnulib/tests/test-c-strcasecmp.c
Copying file gnulib/tests/test-c-strcasestr.c
Copying file gnulib/tests/test-c-strncasecmp.c
Copying file gnulib/tests/test-canonicalize-lgpl.c
Copying file gnulib/tests/test-chown.c
Copying file gnulib/tests/test-chown.h
Copying file gnulib/tests/test-cloexec.c
Copying file gnulib/tests/test-close.c
Copying file gnulib/tests/test-connect.c
Copying file gnulib/tests/test-count-leading-zeros.c
Copying file gnulib/tests/test-count-one-bits.c
Copying file gnulib/tests/test-ctype.c
Copying file gnulib/tests/test-dup.c
Copying file gnulib/tests/test-dup2.c
Copying file gnulib/tests/test-environ.c
Copying file gnulib/tests/test-errno.c
Copying file gnulib/tests/test-fclose.c
Copying file gnulib/tests/test-fcntl-h.c
Copying file gnulib/tests/test-fcntl.c
Copying file gnulib/tests/test-fdatasync.c
Copying file gnulib/tests/test-fdopen.c
Copying file gnulib/tests/test-fflush.c
Copying file gnulib/tests/test-fflush2.c
Copying file gnulib/tests/test-fflush2.sh
Copying file gnulib/tests/test-ffs.c
Copying file gnulib/tests/test-ffsl.c
Copying file gnulib/tests/test-fgetc.c
Copying file gnulib/tests/test-float.c
Copying file gnulib/tests/test-fnmatch-h.c
Copying file gnulib/tests/test-fnmatch.c
Copying file gnulib/tests/test-fpurge.c
Copying file gnulib/tests/test-fputc.c
Copying file gnulib/tests/test-fread.c
Copying file gnulib/tests/test-freading.c
Copying file gnulib/tests/test-fseek.c
Copying file gnulib/tests/test-fseek.sh
Copying file gnulib/tests/test-fseek2.sh
Copying file gnulib/tests/test-fseeko.c
Copying file gnulib/tests/test-fseeko.sh
Copying file gnulib/tests/test-fseeko2.sh
Copying file gnulib/tests/test-fseeko3.c
Copying file gnulib/tests/test-fseeko3.sh
Copying file gnulib/tests/test-fseeko4.c
Copying file gnulib/tests/test-fseeko4.sh
Copying file gnulib/tests/test-fstat.c
Copying file gnulib/tests/test-fsync.c
Copying file gnulib/tests/test-ftell.c
Copying file gnulib/tests/test-ftell.sh
Copying file gnulib/tests/test-ftell2.sh
Copying file gnulib/tests/test-ftell3.c
Copying file gnulib/tests/test-ftello.c
Copying file gnulib/tests/test-ftello.sh
Copying file gnulib/tests/test-ftello2.sh
Copying file gnulib/tests/test-ftello3.c
Copying file gnulib/tests/test-ftello4.c
Copying file gnulib/tests/test-ftello4.sh
Copying file gnulib/tests/test-ftruncate.c
Copying file gnulib/tests/test-ftruncate.sh
Copying file gnulib/tests/test-func.c
Copying file gnulib/tests/test-fwrite.c
Copying file gnulib/tests/test-getaddrinfo.c
Copying file gnulib/tests/test-getcwd-lgpl.c
Copying file gnulib/tests/test-getdelim.c
Copying file gnulib/tests/test-getdtablesize.c
Copying file gnulib/tests/test-getgroups.c
Copying file gnulib/tests/test-gethostname.c
Copying file gnulib/tests/test-getline.c
Copying file gnulib/tests/test-getopt-main.h
Copying file gnulib/tests/test-getopt-posix.c
Copying file gnulib/tests/test-getopt.h
Copying file gnulib/tests/test-getpeername.c
Copying file gnulib/tests/test-getprogname.c
Copying file gnulib/tests/test-getsockname.c
Copying file gnulib/tests/test-getsockopt.c
Copying file gnulib/tests/test-gettimeofday.c
Copying file gnulib/tests/test-grantpt.c
Copying file gnulib/tests/test-ignore-value.c
Copying file gnulib/tests/test-inet_ntop.c
Copying file gnulib/tests/test-inet_pton.c
Copying file gnulib/tests/test-init.sh
Copying file gnulib/tests/test-intprops.c
Copying file gnulib/tests/test-inttypes.c
Copying file gnulib/tests/test-ioctl.c
Copying file gnulib/tests/test-isatty.c
Copying file gnulib/tests/test-isblank.c
Copying file gnulib/tests/test-isnand-nolibm.c
Copying file gnulib/tests/test-isnand.h
Copying file gnulib/tests/test-isnanf-nolibm.c
Copying file gnulib/tests/test-isnanf.h
Copying file gnulib/tests/test-isnanl-nolibm.c
Copying file gnulib/tests/test-isnanl.h
Copying file gnulib/tests/test-langinfo.c
Copying file gnulib/tests/test-ldexp.c
Copying file gnulib/tests/test-ldexp.h
Copying file gnulib/tests/test-limits-h.c
Copying file gnulib/tests/test-listen.c
Copying file gnulib/tests/test-localcharset.c
Copying file gnulib/tests/test-locale.c
Copying file gnulib/tests/test-localeconv.c
Copying file gnulib/tests/test-localename.c
Copying file gnulib/tests/test-lseek.c
Copying file gnulib/tests/test-lseek.sh
Copying file gnulib/tests/test-lstat.c
Copying file gnulib/tests/test-lstat.h
Copying file gnulib/tests/test-malloca.c
Copying file gnulib/tests/test-math.c
Copying file gnulib/tests/test-mbrtowc-w32-1.sh
Copying file gnulib/tests/test-mbrtowc-w32-2.sh
Copying file gnulib/tests/test-mbrtowc-w32-3.sh
Copying file gnulib/tests/test-mbrtowc-w32-4.sh
Copying file gnulib/tests/test-mbrtowc-w32-5.sh
Copying file gnulib/tests/test-mbrtowc-w32.c
Copying file gnulib/tests/test-mbrtowc.c
Copying file gnulib/tests/test-mbrtowc1.sh
Copying file gnulib/tests/test-mbrtowc2.sh
Copying file gnulib/tests/test-mbrtowc3.sh
Copying file gnulib/tests/test-mbrtowc4.sh
Copying file gnulib/tests/test-mbrtowc5.sh
Copying file gnulib/tests/test-mbsinit.c
Copying file gnulib/tests/test-mbsinit.sh
Copying file gnulib/tests/test-mbsrtowcs.c
Copying file gnulib/tests/test-mbsrtowcs1.sh
Copying file gnulib/tests/test-mbsrtowcs2.sh
Copying file gnulib/tests/test-mbsrtowcs3.sh
Copying file gnulib/tests/test-mbsrtowcs4.sh
Copying file gnulib/tests/test-memchr.c
Copying file gnulib/tests/test-mkdir.c
Copying file gnulib/tests/test-mkdir.h
Copying file gnulib/tests/test-nanosleep.c
Copying file gnulib/tests/test-net_if.c
Copying file gnulib/tests/test-netdb.c
Copying file gnulib/tests/test-netinet_in.c
Copying file gnulib/tests/test-nl_langinfo.c
Copying file gnulib/tests/test-nl_langinfo.sh
Copying file gnulib/tests/test-nonblocking-misc.h
Copying file gnulib/tests/test-nonblocking-pipe-child.c
Copying file gnulib/tests/test-nonblocking-pipe-main.c
Copying file gnulib/tests/test-nonblocking-pipe.h
Copying file gnulib/tests/test-nonblocking-pipe.sh
Copying file gnulib/tests/test-nonblocking-reader.h
Copying file gnulib/tests/test-nonblocking-socket-child.c
Copying file gnulib/tests/test-nonblocking-socket-main.c
Copying file gnulib/tests/test-nonblocking-socket.h
Copying file gnulib/tests/test-nonblocking-socket.sh
Copying file gnulib/tests/test-nonblocking-writer.h
Copying file gnulib/tests/test-nonblocking.c
Copying file gnulib/tests/test-open.c
Copying file gnulib/tests/test-open.h
Copying file gnulib/tests/test-openpty.c
Copying file gnulib/tests/test-passfd.c
Copying file gnulib/tests/test-pathmax.c
Copying file gnulib/tests/test-perror.c
Copying file gnulib/tests/test-perror.sh
Copying file gnulib/tests/test-perror2.c
Copying file gnulib/tests/test-pipe.c
Copying file gnulib/tests/test-pipe2.c
Copying file gnulib/tests/test-poll-h.c
Copying file gnulib/tests/test-poll.c
Copying file gnulib/tests/test-posix_openpt.c
Copying file gnulib/tests/test-posix_spawn1.c
Copying file gnulib/tests/test-posix_spawn1.in.sh
Copying file gnulib/tests/test-posix_spawn2.c
Copying file gnulib/tests/test-posix_spawn2.in.sh
Copying file gnulib/tests/test-posix_spawn_file_actions_addclose.c
Copying file gnulib/tests/test-posix_spawn_file_actions_adddup2.c
Copying file gnulib/tests/test-posix_spawn_file_actions_addopen.c
Copying file gnulib/tests/test-pthread_sigmask1.c
Copying file gnulib/tests/test-pthread_sigmask2.c
Copying file gnulib/tests/test-ptsname.c
Copying file gnulib/tests/test-ptsname_r.c
Copying file gnulib/tests/test-raise.c
Copying file gnulib/tests/test-rawmemchr.c
Copying file gnulib/tests/test-read.c
Copying file gnulib/tests/test-readlink.c
Copying file gnulib/tests/test-readlink.h
Copying file gnulib/tests/test-recv.c
Copying file gnulib/tests/test-regex.c
Copying file gnulib/tests/test-sched.c
Copying file gnulib/tests/test-select-fd.c
Copying file gnulib/tests/test-select-in.sh
Copying file gnulib/tests/test-select-out.sh
Copying file gnulib/tests/test-select-stdin.c
Copying file gnulib/tests/test-select.c
Copying file gnulib/tests/test-select.h
Copying file gnulib/tests/test-send.c
Copying file gnulib/tests/test-setenv.c
Copying file gnulib/tests/test-setlocale1.c
Copying file gnulib/tests/test-setlocale1.sh
Copying file gnulib/tests/test-setlocale2.c
Copying file gnulib/tests/test-setlocale2.sh
Copying file gnulib/tests/test-setsockopt.c
Copying file gnulib/tests/test-sigaction.c
Copying file gnulib/tests/test-signal-h.c
Copying file gnulib/tests/test-signbit.c
Copying file gnulib/tests/test-sigpipe.c
Copying file gnulib/tests/test-sigpipe.sh
Copying file gnulib/tests/test-sigprocmask.c
Copying file gnulib/tests/test-sleep.c
Copying file gnulib/tests/test-snprintf.c
Copying file gnulib/tests/test-sockets.c
Copying file gnulib/tests/test-spawn.c
Copying file gnulib/tests/test-stat-time.c
Copying file gnulib/tests/test-stat.c
Copying file gnulib/tests/test-stat.h
Copying file gnulib/tests/test-stdalign.c
Copying file gnulib/tests/test-stdbool.c
Copying file gnulib/tests/test-stddef.c
Copying file gnulib/tests/test-stdint.c
Copying file gnulib/tests/test-stdio.c
Copying file gnulib/tests/test-stdlib.c
Copying file gnulib/tests/test-strchrnul.c
Copying file gnulib/tests/test-strerror.c
Copying file gnulib/tests/test-strerror_r.c
Copying file gnulib/tests/test-string.c
Copying file gnulib/tests/test-strings.c
Copying file gnulib/tests/test-strnlen.c
Copying file gnulib/tests/test-symlink.c
Copying file gnulib/tests/test-symlink.h
Copying file gnulib/tests/test-sys_ioctl.c
Copying file gnulib/tests/test-sys_select.c
Copying file gnulib/tests/test-sys_socket.c
Copying file gnulib/tests/test-sys_stat.c
Copying file gnulib/tests/test-sys_time.c
Copying file gnulib/tests/test-sys_types.c
Copying file gnulib/tests/test-sys_uio.c
Copying file gnulib/tests/test-sys_utsname.c
Copying file gnulib/tests/test-sys_wait.c
Copying file gnulib/tests/test-sys_wait.h
Copying file gnulib/tests/test-termios.c
Copying file gnulib/tests/test-thread_create.c
Copying file gnulib/tests/test-thread_self.c
Copying file gnulib/tests/test-time.c
Copying file gnulib/tests/test-ttyname_r.c
Copying file gnulib/tests/test-uname.c
Copying file gnulib/tests/test-unistd.c
Copying file gnulib/tests/test-unlockpt.c
Copying file gnulib/tests/test-unsetenv.c
Copying file gnulib/tests/test-usleep.c
Copying file gnulib/tests/test-vasnprintf.c
Copying file gnulib/tests/test-vasprintf.c
Copying file gnulib/tests/test-vc-list-files-cvs.sh
Copying file gnulib/tests/test-vc-list-files-git.sh
Copying file gnulib/tests/test-verify-try.c
Copying file gnulib/tests/test-verify.c
Copying file gnulib/tests/test-verify.sh
Copying file gnulib/tests/test-vsnprintf.c
Copying file gnulib/tests/test-wchar.c
Copying file gnulib/tests/test-wcrtomb-w32-1.sh
Copying file gnulib/tests/test-wcrtomb-w32-2.sh
Copying file gnulib/tests/test-wcrtomb-w32-3.sh
Copying file gnulib/tests/test-wcrtomb-w32-4.sh
Copying file gnulib/tests/test-wcrtomb-w32-5.sh
Copying file gnulib/tests/test-wcrtomb-w32.c
Copying file gnulib/tests/test-wcrtomb.c
Copying file gnulib/tests/test-wcrtomb.sh
Copying file gnulib/tests/test-wctype-h.c
Copying file gnulib/tests/test-wcwidth.c
Copying file gnulib/tests/test-write.c
Copying file gnulib/tests/test-xalloc-die.c
Copying file gnulib/tests/test-xalloc-die.sh
Copying file gnulib/tests/uniwidth/test-uc_width.c
Copying file gnulib/tests/uniwidth/test-uc_width2.c
Copying file gnulib/tests/uniwidth/test-uc_width2.sh
Copying file gnulib/tests/unlockpt.c
Copying file gnulib/tests/unused-parameter.h
Copying file gnulib/tests/w32sock.h
Copying file gnulib/tests/wait-process.c
Copying file gnulib/tests/wait-process.h
Copying file gnulib/tests/warn-on-use.h
Copying file gnulib/tests/wctob.c
Copying file gnulib/tests/wctomb-impl.h
Copying file gnulib/tests/wctomb.c
Copying file gnulib/tests/write.c
Copying file gnulib/tests/xalloc-die.c
Copying file gnulib/tests/xalloc.h
Copying file gnulib/tests/xmalloc.c
Copying file gnulib/tests/zerosize-ptr.h
Copying file m4/00gnulib.m4
Copying file m4/__inline.m4
Copying file m4/absolute-header.m4
Copying file m4/alloca.m4
Copying file m4/arpa_inet_h.m4
Copying file m4/asm-underscore.m4
Copying file m4/autobuild.m4
Copying file m4/base64.m4
Copying file m4/btowc.m4
Copying file m4/builtin-expect.m4
Copying file m4/byteswap.m4
Copying file m4/calloc.m4
Copying file m4/canonicalize.m4
Copying file m4/chown.m4
Copying file m4/clock_time.m4
Copying file m4/close.m4
Copying file m4/codeset.m4
Copying file m4/configmake.m4
Copying file m4/count-leading-zeros.m4
Copying file m4/count-one-bits.m4
Copying file m4/ctype.m4
Copying file m4/dirname.m4
Copying file m4/double-slash-root.m4
Copying file m4/dup.m4
Copying file m4/dup2.m4
Copying file m4/eealloc.m4
Copying file m4/environ.m4
Copying file m4/errno_h.m4
Copying file m4/error.m4
Copying file m4/execinfo.m4
Copying file m4/exponentd.m4
Copying file m4/exponentf.m4
Copying file m4/exponentl.m4
Copying file m4/extensions.m4
Copying file m4/extern-inline.m4
Copying file m4/fatal-signal.m4
Copying file m4/fclose.m4
Copying file m4/fcntl-o.m4
Copying file m4/fcntl.m4
Copying file m4/fcntl_h.m4
Copying file m4/fdatasync.m4
Copying file m4/fdopen.m4
Copying file m4/fflush.m4
Copying file m4/ffs.m4
Copying file m4/ffsl.m4
Copying file m4/flexmember.m4
Copying file m4/float_h.m4
Copying file m4/fnmatch.m4
Copying file m4/fnmatch_h.m4
Copying file m4/fpieee.m4
Copying file m4/fpurge.m4
Copying file m4/freading.m4
Copying file m4/fseek.m4
Copying file m4/fseeko.m4
Copying file m4/fstat.m4
Copying file m4/fsync.m4
Copying file m4/ftell.m4
Copying file m4/ftello.m4
Copying file m4/ftruncate.m4
Copying file m4/func.m4
Copying file m4/getaddrinfo.m4
Copying file m4/getcwd.m4
Copying file m4/getdelim.m4
Copying file m4/getdtablesize.m4
Copying file m4/getgroups.m4
Copying file m4/gethostname.m4
Copying file m4/getline.m4
Copying file m4/getopt.m4
Copying file m4/getpagesize.m4
Copying file m4/getpass.m4
Copying file m4/getprogname.m4
Copying file m4/gettimeofday.m4
Copying file m4/getugroups.m4
Copying file m4/glibc21.m4
Copying file m4/gnulib-common.m4
Copying file m4/gnulib-tool.m4
Copying file m4/grantpt.m4
Copying file m4/host-cpu-c-abi.m4
Copying file m4/hostent.m4
Copying file m4/include_next.m4
Copying file m4/inet_ntop.m4
Copying file m4/inet_pton.m4
Copying file m4/intl-thread-locale.m4
Copying file m4/intlmacosx.m4
Copying file m4/intmax_t.m4
Copying file m4/inttypes-pri.m4
Copying file m4/inttypes.m4
Copying file m4/inttypes_h.m4
Copying file m4/ioctl.m4
Copying file m4/isatty.m4
Copying file m4/isblank.m4
Copying file m4/isnand.m4
Copying file m4/isnanf.m4
Copying file m4/isnanl.m4
Copying file m4/langinfo_h.m4
Copying file m4/largefile.m4
Copying file m4/lcmessage.m4
Copying file m4/ldexp.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/libunistring-base.m4
Copying file m4/limits-h.m4
Copying file m4/localcharset.m4
Copying file m4/locale-fr.m4
Copying file m4/locale-ja.m4
Copying file m4/locale-tr.m4
Copying file m4/locale-zh.m4
Copying file m4/locale_h.m4
Copying file m4/localeconv.m4
Copying file m4/localename.m4
Copying file m4/localtime-buffer.m4
Copying file m4/lock.m4
Copying file m4/longlong.m4
Copying file m4/lseek.m4
Copying file m4/lstat.m4
Copying file m4/malloc.m4
Copying file m4/malloca.m4
Copying file m4/manywarnings-c++.m4
Copying file m4/manywarnings.m4
Copying file m4/math_h.m4
Copying file m4/mbrtowc.m4
Copying file m4/mbsinit.m4
Copying file m4/mbsrtowcs.m4
Copying file m4/mbstate_t.m4
Copying file m4/mbtowc.m4
Copying file m4/memchr.m4
Copying file m4/mgetgroups.m4
Copying file m4/mkdir.m4
Copying file m4/mkdtemp.m4
Copying file m4/mkostemp.m4
Copying file m4/mkostemps.m4
Copying file m4/mktime.m4
Copying file m4/mmap-anon.m4
Copying file m4/mode_t.m4
Copying file m4/msvc-inval.m4
Copying file m4/msvc-nothrow.m4
Copying file m4/multiarch.m4
Copying file m4/nanosleep.m4
Copying file m4/net_if_h.m4
Copying file m4/netdb_h.m4
Copying file m4/netinet_in_h.m4
Copying file m4/nl_langinfo.m4
Copying file m4/nocrash.m4
Copying file m4/nonblocking.m4
Copying file m4/off_t.m4
Copying file m4/open-cloexec.m4
Copying file m4/open.m4
Copying file m4/passfd.m4
Copying file m4/pathmax.m4
Copying file m4/perror.m4
Copying file m4/physmem.m4
Copying file m4/pipe.m4
Copying file m4/pipe2.m4
Copying file m4/poll.m4
Copying file m4/poll_h.m4
Copying file m4/posix-shell.m4
Copying file m4/posix_openpt.m4
Copying file m4/posix_spawn.m4
Copying file m4/printf.m4
Copying file m4/pthread.m4
Copying file m4/pthread_rwlock_rdlock.m4
Copying file m4/pthread_sigmask.m4
Copying file m4/ptsname.m4
Copying file m4/ptsname_r.m4
Copying file m4/pty.m4
Copying file m4/pty_h.m4
Copying file m4/putenv.m4
Copying file m4/raise.m4
Copying file m4/rawmemchr.m4
Copying file m4/read.m4
Copying file m4/readlink.m4
Copying file m4/realloc.m4
Copying file m4/regex.m4
Copying file m4/sched_h.m4
Copying file m4/secure_getenv.m4
Copying file m4/select.m4
Copying file m4/servent.m4
Copying file m4/setenv.m4
Copying file m4/setlocale.m4
Copying file m4/sh-filename.m4
Copying file m4/sig_atomic_t.m4
Copying file m4/sigaction.m4
Copying file m4/signal_h.m4
Copying file m4/signalblocking.m4
Copying file m4/signbit.m4
Copying file m4/sigpipe.m4
Copying file m4/size_max.m4
Copying file m4/sleep.m4
Copying file m4/snprintf.m4
Copying file m4/socketlib.m4
Copying file m4/sockets.m4
Copying file m4/socklen.m4
Copying file m4/sockpfaf.m4
Copying file m4/spawn_h.m4
Copying file m4/ssize_t.m4
Copying file m4/stat-time.m4
Copying file m4/stat.m4
Copying file m4/stdalign.m4
Copying file m4/stdarg.m4
Copying file m4/stdbool.m4
Copying file m4/stddef_h.m4
Copying file m4/stdint.m4
Copying file m4/stdint_h.m4
Copying file m4/stdio_h.m4
Copying file m4/stdlib_h.m4
Copying file m4/stpcpy.m4
Copying file m4/strcase.m4
Copying file m4/strchrnul.m4
Copying file m4/strdup.m4
Copying file m4/strerror.m4
Copying file m4/strerror_r.m4
Copying file m4/string_h.m4
Copying file m4/strings_h.m4
Copying file m4/strndup.m4
Copying file m4/strnlen.m4
Copying file m4/strptime.m4
Copying file m4/strsep.m4
Copying file m4/strtok_r.m4
Copying file m4/symlink.m4
Copying file m4/sys_ioctl_h.m4
Copying file m4/sys_select_h.m4
Copying file m4/sys_socket_h.m4
Copying file m4/sys_stat_h.m4
Copying file m4/sys_time_h.m4
Copying file m4/sys_types_h.m4
Copying file m4/sys_uio_h.m4
Copying file m4/sys_utsname_h.m4
Copying file m4/sys_wait_h.m4
Copying file m4/tempname.m4
Copying file m4/termios_h.m4
Copying file m4/thread.m4
Copying file m4/threadlib.m4
Copying file m4/time_h.m4
Copying file m4/time_r.m4
Copying file m4/timegm.m4
Copying file m4/tm_gmtoff.m4
Copying file m4/ttyname_r.m4
Copying file m4/uname.m4
Copying file m4/ungetc.m4
Copying file m4/unistd_h.m4
Copying file m4/unlockpt.m4
Copying file m4/usleep.m4
Copying file m4/vasnprintf.m4
Copying file m4/vasprintf.m4
Copying file m4/vsnprintf.m4
Copying file m4/wait-process.m4
Copying file m4/waitpid.m4
Copying file m4/warn-on-use.m4
Copying file m4/warnings.m4
Copying file m4/wchar_h.m4
Copying file m4/wchar_t.m4
Copying file m4/wcrtomb.m4
Copying file m4/wctob.m4
Copying file m4/wctomb.m4
Copying file m4/wctype_h.m4
Copying file m4/wcwidth.m4
Copying file m4/wint_t.m4
Copying file m4/write.m4
Copying file m4/xalloc.m4
Copying file m4/xsize.m4
Copying file maint.mk
Creating gnulib/lib/gnulib.mk
Creating m4/gnulib-cache.m4
Creating m4/gnulib-comp.m4
Creating gnulib/tests/gnulib.mk
Updating ./build-aux/.gitignore (backup in ./build-aux/.gitignore~)
Creating ./gnulib/lib/.gitignore
Creating ./gnulib/lib/glthread/.gitignore
Creating ./gnulib/lib/uniwidth/.gitignore
Creating ./gnulib/tests/.gitignore
Creating ./gnulib/tests/glthread/.gitignore
Creating ./gnulib/tests/uniwidth/.gitignore
Updating ./m4/.gitignore (backup in ./m4/.gitignore~)
Finished.
You may need to add #include directives for the following .h files.
  #include <arpa/inet.h>
  #include <byteswap.h>
  #include <execinfo.h>
  #include <fcntl.h>
  #include <fnmatch.h>
  #include <locale.h>
  #include <math.h>
  #include <net/if.h>
  #include <netdb.h>
  #include <poll.h>
  #include <pthread.h>
  #include <pty.h>
  #include <regex.h>
  #include <sched.h>
  #include <signal.h>
  #include <stdarg.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <strings.h>
  #include <sys/ioctl.h>
  #include <sys/socket.h>
  #include <sys/stat.h>
  #include <sys/time.h>
  #include <sys/utsname.h>
  #include <sys/wait.h>
  #include <termios.h>
  #include <time.h>
  #include <unistd,h>
  #include <unistd.h>
  #include <wchar.h>
  /* Include only after all system include files.  */
  #include "areadlink.h"
  #include "base64.h"
  #include "bitrotate.h"
  #include "c-ctype.h"
  #include "c-strcase.h"
  #include "c-strcasestr.h"
  #include "configmake.h"
  #include "count-leading-zeros.h"
  #include "count-one-bits.h"
  #include "dirname.h"
  #include "ignore-value.h"
  #include "intprops.h"
  #include "mgetgroups.h"
  #include "nonblocking.h"
  #include "passfd.h"
  #include "physmem.h"
  #include "stat-time.h"
  #include "verify.h"
You may need to use the following Makefile variables when linking.
Use them in <program>_LDADD when linking a program, or
in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library.
  $(GETADDRINFO_LIB)
  $(GETHOSTNAME_LIB)
  $(HOSTENT_LIB)
  $(INET_NTOP_LIB)
  $(INET_PTON_LIB)
  $(LDEXP_LIBM)
  $(LIBSOCKET)
  $(LIB_CLOCK_GETTIME)
  $(LIB_EXECINFO)
  $(LIB_FDATASYNC)
  $(LIB_POLL)
  $(LIB_PTHREAD)
  $(LIB_PTHREAD_SIGMASK)
  $(LIB_SELECT)
  $(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
  $(LTLIBTHREAD) when linking with libtool, $(LIBTHREAD) otherwise
  $(PTY_LIB)
  $(SERVENT_LIB)
Don't forget to
  - "include gnulib.mk" from within "gnulib/lib/Makefile.am",
  - "include gnulib.mk" from within "gnulib/tests/Makefile.am",
  - mention "-I m4" in ACLOCAL_AMFLAGS in Makefile.am,
  - mention "m4/gnulib-cache.m4" in EXTRA_DIST in Makefile.am,
  - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC,
  - invoke gl_INIT in ./configure.ac.
running: AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install --force -I m4  --no-recursive
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: true --copy --force
autoreconf: running: /usr/bin/autoconf --include=m4 --force
autoreconf: running: /usr/bin/autoheader --include=m4 --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:126: installing 'build-aux/compile'
configure.ac:27: installing 'build-aux/missing'
Makefile.am: installing './INSTALL'
examples/Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
autoreconf: Leaving directory `.'
./bootstrap: ln -fs ../.gnulib/build-aux/install-sh build-aux/install-sh
./bootstrap: ln -fs ../.gnulib/build-aux/depcomp build-aux/depcomp
./bootstrap: ln -fs ../.gnulib/build-aux/config.guess build-aux/config.guess
./bootstrap: ln -fs ../.gnulib/build-aux/config.sub build-aux/config.sub
./bootstrap: ln -fs .gnulib/doc/INSTALL INSTALL
./bootstrap: done.  Now you can run './configure'.
I am going to run configure with no arguments - if you wish
to pass any to it, please specify them on the ./autogen.sh command line.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for Minix Amsterdam compiler... no
checking for ar... ar
checking for ranlib... ranlib
checking whether gcc and cc understand -c and -o together... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
configure: autobuild project... libvirt
configure: autobuild revision... v2.1.0-rc1-8699-g11187de
configure: autobuild hostname... virtlab205.virt.lab.eng.bos.redhat.com
configure: autobuild timestamp... 20190315T051354Z
checking for sys/socket.h... yes
checking for arpa/inet.h... yes
checking for features.h... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for execinfo.h... yes
checking for fnmatch.h... yes
checking for wctype.h... yes
checking for sys/stat.h... (cached) yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for getopt.h... yes
checking for sys/cdefs.h... yes
checking for stdio_ext.h... yes
checking for termios.h... yes
checking for sys/time.h... yes
checking for grp.h... yes
checking for langinfo.h... yes
checking for limits.h... yes
checking for xlocale.h... yes
checking for sys/mman.h... yes
checking for pty.h... yes
checking for poll.h... yes
checking for sys/ioctl.h... yes
checking for sys/filio.h... no
checking for pthread.h... yes
checking for malloc.h... yes
checking for sys/select.h... yes
checking for wchar.h... yes
checking for stdint.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/uio.h... yes
checking for sys/utsname.h... yes
checking for sys/wait.h... yes
checking for crtdefs.h... no
checking for inttypes.h... (cached) yes
checking for math.h... yes
checking for sys/types.h... (cached) yes
checking for spawn.h... yes
checking whether the preprocessor supports include_next... yes
checking whether system header files limit the line length... no
checking whether <sys/socket.h> is self-contained... yes
checking for shutdown... yes
checking whether <sys/socket.h> defines the SHUT_* macros... yes
checking for struct sockaddr_storage... yes
checking for sa_family_t... yes
checking for struct sockaddr_storage.ss_family... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for C/C++ restrict keyword... __restrict
checking whether <wchar.h> uses 'inline' correctly... yes
checking for btowc... yes
checking for canonicalize_file_name... yes
checking for getcwd... yes
checking for readlink... yes
checking for realpath... yes
checking for readlinkat... yes
checking for chown... yes
checking for fchown... yes
checking for _set_invalid_parameter_handler... no
checking for fcntl... yes
checking for symlink... yes
checking for ffsl... yes
checking for fnmatch... yes
checking for isblank... yes
checking for iswctype... yes
checking for mbsrtowcs... yes
checking for mempcpy... yes
checking for wmemchr... yes
checking for wmemcpy... yes
checking for wmempcpy... yes
checking for fpurge... no
checking for __fpurge... yes
checking for __freading... yes
checking for fsync... yes
checking for getdelim... yes
checking for getdtablesize... yes
checking for getpass... yes
checking for __fsetlocking... yes
checking for gettimeofday... yes
checking for lstat... yes
checking for mbsinit... yes
checking for mbrtowc... yes
checking for mprotect... yes
checking for getgrouplist... yes
checking for mkostemp... yes
checking for mkostemps... yes
checking for tzset... yes
checking for nl_langinfo... yes
checking for recvmsg... yes
checking for sendmsg... yes
checking for strerror_r... yes
checking for __xpg_strerror_r... yes
checking for pipe... yes
checking for pipe2... yes
checking for posix_openpt... yes
checking for pthread_sigmask... no
checking for secure_getenv... yes
checking for getuid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getegid... yes
checking for setenv... yes
checking for sigaction... yes
checking for sigaltstack... yes
checking for siginterrupt... yes
checking for sleep... yes
checking for snprintf... yes
checking for strdup... yes
checking for catgets... yes
checking for strndup... yes
checking for strptime... yes
checking for localtime_r... yes
checking for timegm... yes
checking for usleep... yes
checking for vasnprintf... no
checking for wcrtomb... yes
checking for iswcntrl... yes
checking for wcwidth... yes
checking for ftruncate... yes
checking for getprogname... no
checking for getexecname... no
checking for newlocale... yes
checking for uselocale... yes
checking for duplocale... yes
checking for freelocale... yes
checking for socketpair... yes
checking for ptsname_r... yes
checking for shutdown... (cached) yes
checking for wctob... yes
checking for cfmakeraw... yes
checking for fallocate... yes
checking for getifaddrs... yes
checking for getmntent_r... yes
checking for getpwuid_r... yes
checking for getrlimit... yes
checking for if_indextoname... yes
checking for mmap... yes
checking for posix_fallocate... yes
checking for posix_memalign... yes
checking for prlimit... yes
checking for sched_getaffinity... yes
checking for sched_setscheduler... yes
checking for setgroups... yes
checking for setns... yes
checking for setrlimit... yes
checking for sysctlbyname... no
checking for unshare... yes
checking for nl_langinfo and CODESET... yes
checking for a traditional french locale... fr_FR
checking whether malloc, realloc, calloc are POSIX compliant... yes
checking whether // is distinct from /... no
checking whether realpath works... yes
checking for uid_t in sys/types.h... yes
checking for unistd.h... (cached) yes
checking for working chown... yes
checking whether chown dereferences symlinks... yes
checking whether chown honors trailing slash... yes
checking whether chown always updates ctime... yes
checking for unsigned long long int... yes
checking if environ is properly declared... yes
checking for complete errno.h... yes
checking for working fcntl.h... yes
checking for pid_t... yes
checking for mode_t... yes
checking whether fdatasync is declared... yes
checking for mbstate_t... yes
checking whether stdin defaults to large file offsets... yes
checking whether fseeko is declared... yes
checking for fseeko... yes
checking whether fflush works on input streams... no
checking whether stat file-mode macros are broken... no
checking for nlink_t... yes
checking whether ftello is declared... yes
checking for ftello... yes
checking whether ftello works... yes
checking for library containing gethostbyname... none required
checking for gethostbyname... yes
checking for library containing getservbyname... none required
checking for getservbyname... yes
checking for library containing inet_ntop... none required
checking whether inet_ntop is declared... yes
checking for IPv4 sockets... yes
checking for IPv6 sockets... yes
checking whether getcwd (NULL, 0) allocates memory for result... yes
checking for getcwd with POSIX signature... yes
checking whether getdelim is declared... yes
checking whether getdtablesize is declared... yes
checking type of array argument to getgroups... gid_t
checking whether getline is declared... yes
checking whether getopt is POSIX compatible... yes
checking whether fflush_unlocked is declared... yes
checking whether flockfile is declared... yes
checking whether fputs_unlocked is declared... yes
checking whether funlockfile is declared... yes
checking whether putc_unlocked is declared... yes
checking for struct timeval... yes
checking for wide-enough struct timeval.tv_sec member... yes
checking whether ldexp() can be used without linking with libm... yes
checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... no
checking for wchar_t... yes
checking for good max_align_t... no
checking whether NULL can be used in arbitrary expressions... yes
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for the common suffixes of directories in the library search path... lib64,lib64
checking whether imported symbols can be declared weak... yes
checking whether the linker supports --as-needed... yes
checking whether the linker supports --push-state... yes
checking for pthread.h... (cached) yes
checking for multithread API to use... posix
checking whether lstat correctly handles trailing slash... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for long long int... yes
checking for a traditional japanese locale... ja_JP
checking for a transitional chinese locale... zh_CN.GB18030
checking for a french Unicode locale... fr_FR.UTF-8
checking for inline... inline
checking for mmap... (cached) yes
checking for MAP_ANONYMOUS... yes
checking whether memchr works... yes
checking whether time_t is signed... yes
checking whether alarm is declared... yes
checking for working mktime... yes
checking whether C symbols are prefixed with underscore at the linker level... no
checking for O_CLOEXEC... yes
checking for promoted mode_t type... mode_t
checking for library containing forkpty... -lutil
checking whether strerror(0) succeeds... yes
checking for strerror_r with POSIX signature... no
checking whether __xpg_strerror_r works... yes
checking whether strerror_r is declared... yes
checking for external symbol _system_configuration... no
checking for library containing setsockopt... none needed
checking for sigset_t... yes
checking for SIGPIPE... yes
checking whether we are using the GNU C Library >= 2.1 or uClibc... yes
checking whether <sys/select.h> is self-contained... yes
checking whether setenv is declared... yes
checking search.h usability... yes
checking search.h presence... yes
checking for search.h... yes
checking for tsearch... yes
checking whether snprintf returns a byte count as in C99... yes
checking whether snprintf is declared... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for wint_t... yes
checking whether wint_t is too small... no
checking whether stdint.h conforms to C99... yes
checking whether stdint.h predates C++11... no
checking whether stdint.h has UINTMAX_WIDTH etc.... no
checking whether strdup is declared... yes
checking whether strndup is declared... yes
checking whether strnlen is declared... yes
checking for struct tm.tm_gmtoff... yes
checking whether strtok_r is declared... yes
checking for struct timespec in <time.h>... yes
checking whether ttyname_r is declared... yes
checking whether unsetenv is declared... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for intmax_t... yes
checking where to find the exponent in a 'double'... word 1 bit 20
checking for snprintf... (cached) yes
checking for strnlen... yes
checking for wcslen... yes
checking for wcsnlen... yes
checking for mbrtowc... (cached) yes
checking for wcrtomb... (cached) yes
checking whether _snprintf is declared... no
checking whether vsnprintf is declared... yes
checking whether strerror_r is declared... (cached) yes
checking for strerror_r... (cached) yes
checking whether strerror_r returns char *... yes
checking for sig_atomic_t... yes
checking whether ungetc works on arbitrary bytes... yes
checking for inttypes.h... (cached) yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking where to find the exponent in a 'float'... word 0 bit 23
checking whether byte ordering is bigendian... no
checking whether long double and double are the same... no
checking for LC_MESSAGES... yes
checking whether uselocale works... yes
checking for fake locale system (OpenBSD)... no
checking for Solaris 11.4 locale system... no
checking for getlocalename_l... no
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for CFLocaleCopyPreferredLanguages... no
checking for library containing posix_spawn... none required
checking for posix_spawn... yes
checking whether posix_spawn works... yes
checking whether posix_spawnattr_setschedpolicy is supported... yes
checking whether posix_spawnattr_setschedparam is supported... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking for alloca as a compiler built-in... yes
checking whether btowc(0) is correct... yes
checking whether btowc(EOF) is correct... yes
checking for __builtin_expect... yes
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking for clock_settime... yes
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for library containing backtrace_symbols_fd... none required
checking whether fflush works on input streams... (cached) no
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking for library containing fdatasync... none required
checking whether fflush works on input streams... (cached) no
checking for ffs... yes
checking for flexible array member... yes
checking whether conversion from 'int' to 'long double' works... yes
checking for working POSIX fnmatch... yes
checking whether fpurge is declared... no
checking for fseeko... (cached) yes
checking whether fflush works on input streams... (cached) no
checking for _fseeki64... no
checking for ftello... (cached) yes
checking whether ftello works... (cached) yes
checking whether __func__ is available... yes
checking how to do getaddrinfo, freeaddrinfo and getnameinfo... checking for library containing getaddrinfo... none required
checking for getaddrinfo... yes
checking whether gai_strerror is declared... yes
checking whether gai_strerrorA is declared... no
checking for gai_strerror with POSIX signature... yes
checking for struct sockaddr.sa_len... no
checking whether getaddrinfo is declared... yes
checking whether freeaddrinfo is declared... yes
checking whether getnameinfo is declared... yes
checking for struct addrinfo... yes
checking for working getdelim function... yes
checking whether getdtablesize works... yes
checking for getgroups... yes
checking for working getgroups... yes
checking whether getgroups handles negative values... yes
checking for gethostname... yes
checking for HOST_NAME_MAX... yes
checking for getline... yes
checking for working getline function... yes
checking whether gettimeofday clobbers localtime buffer... no
checking for gettimeofday with POSIX signature... almost
checking for library containing gethostbyname... (cached) none required
checking for gethostbyname... (cached) yes
checking for library containing inet_ntop... (cached) none required
checking whether inet_ntop is declared... (cached) yes
checking for library containing inet_pton... none required
checking whether inet_pton is declared... yes
checking for ioctl... yes
checking for ioctl with POSIX signature... no
checking whether langinfo.h defines CODESET... yes
checking whether langinfo.h defines T_FMT_AMPM... yes
checking whether langinfo.h defines ALTMON_1... no
checking whether langinfo.h defines ERA... yes
checking whether langinfo.h defines YESEXPR... yes
checking whether the compiler supports the __inline keyword... yes
checking whether locale.h conforms to POSIX:2001... yes
checking whether locale.h defines locale_t... yes
checking whether struct lconv is properly defined... yes
checking for pthread_rwlock_t... yes
checking whether pthread_rwlock_rdlock prefers a writer to a reader... no
checking whether lseek detects pipes... yes
checking whether mbrtowc handles incomplete characters... yes
checking whether mbrtowc works as well as mbtowc... yes
checking whether mbrtowc handles a NULL pwc argument... yes
checking whether mbrtowc handles a NULL string argument... yes
checking whether mbrtowc has a correct return value... yes
checking whether mbrtowc returns 0 when parsing a NUL character... yes
checking whether mbrtowc works on empty input... no
checking whether the C locale is free of encoding errors... no
checking whether mbrtowc handles incomplete characters... (cached) yes
checking whether mbrtowc works as well as mbtowc... (cached) yes
checking whether mbrtowc handles incomplete characters... (cached) yes
checking whether mbrtowc works as well as mbtowc... (cached) yes
checking whether mbsrtowcs works... yes
checking whether mkdir handles trailing slash... yes
checking whether mkdir handles trailing dot... yes
checking for mkdtemp... yes
checking for __mktime_internal... no
checking whether <net/if.h> is self-contained... yes
checking whether <netinet/in.h> is self-contained... yes
checking whether YESEXPR works... yes
checking whether open recognizes a trailing slash... yes
checking whether openpty is declared... yes
checking for const-safe openpty signature... yes
checking for struct msghdr.msg_accrights... no
checking whether perror matches strerror... yes
checking for sys/pstat.h... no
checking for sys/sysmp.h... no
checking for sys/sysinfo.h... yes
checking for machine/hal_sysinfo.h... no
checking for sys/table.h... no
checking for sys/param.h... (cached) yes
checking for sys/systemcfg.h... no
checking for sys/sysctl.h... yes
checking for pstat_getstatic... no
checking for pstat_getdynamic... no
checking for sysmp... no
checking for getsysinfo... no
checking for sysctl... yes
checking for table... no
checking for sysinfo... yes
checking for struct sysinfo.mem_unit... yes
checking for poll... yes
checking for a shell that conforms to POSIX... /bin/sh
checking whether <pthread.h> pollutes the namespace... no
checking for pthread_t... yes
checking for pthread_spinlock_t... yes
checking for library containing pthread_create and pthread_join... -pthread
checking for pthread_sigmask in -pthread -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state... yes
checking whether pthread_sigmask is only a macro... no
checking whether pthread_sigmask returns error numbers... yes
checking whether pthread_sigmask unblocks signals correctly... guessing yes
checking for raise... yes
checking for sigprocmask... yes
checking for rawmemchr... yes
checking whether readlink signature is correct... yes
checking whether readlink handles trailing slash correctly... yes
checking for working re_compile_pattern... no
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking whether isblank is declared... yes
checking whether select supports a 0 argument... yes
checking whether select detects invalid fds... yes
checking for library containing getservbyname... (cached) none required
checking for getservbyname... (cached) yes
checking whether setenv validates arguments... yes
checking for struct sigaction.sa_sigaction... yes
checking for volatile sig_atomic_t... yes
checking for sighandler_t... yes
checking for sigprocmask... (cached) yes
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking whether sleep is declared... yes
checking for working sleep... yes
checking for snprintf... (cached) yes
checking whether snprintf respects a size of 1... yes
checking whether printf supports POSIX/XSI format strings with positions... yes
checking for socklen_t... yes
checking for ssize_t... yes
checking whether stat handles trailing slashes on files... yes
checking for struct stat.st_atim.tv_nsec... yes
checking whether struct stat.st_atim is of type struct timespec... yes
checking for struct stat.st_birthtimespec.tv_nsec... no
checking for struct stat.st_birthtimensec... no
checking for struct stat.st_birthtim.tv_nsec... no
checking for working stdalign.h... yes
checking for va_copy... yes
checking for good max_align_t... (cached) no
checking whether NULL can be used in arbitrary expressions... (cached) yes
checking which flavor of printf attribute matches inttypes macros... system
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking whether strncasecmp is declared... yes
checking for strchrnul... yes
checking whether strchrnul works... yes
checking for working strerror function... yes
checking for working strndup... yes
checking for working strnlen... yes
checking for strsep... yes
checking for strtok_r... yes
checking whether strtok_r works... yes
checking whether <sys/ioctl.h> declares ioctl... yes
checking for nlink_t... (cached) yes
checking for struct utsname... yes
checking whether localtime_r is declared... yes
checking whether localtime_r is compatible with its POSIX signature... yes
checking for ttyname_r... yes
checking whether ttyname_r is compatible with its POSIX signature... yes
checking whether ttyname_r works with small buffers... yes
checking for uname... yes
checking for unsetenv... yes
checking for unsetenv() return type... int
checking whether unsetenv obeys POSIX... yes
checking for useconds_t... yes
checking whether usleep allows large arguments... yes
checking for ptrdiff_t... yes
checking for vasprintf... yes
checking for vsnprintf... yes
checking whether snprintf respects a size of 1... (cached) yes
checking whether printf supports POSIX/XSI format strings with positions... (cached) yes
checking whether mbrtowc handles incomplete characters... (cached) yes
checking whether mbrtowc works as well as mbtowc... (cached) yes
checking whether wcrtomb return value is correct... yes
checking whether iswcntrl works... yes
checking for towlower... yes
checking for wctype_t... yes
checking for wctrans_t... yes
checking whether wcwidth is declared... yes
checking whether wcwidth works reasonably in UTF-8 locales... yes
checking for stdint.h... (cached) yes
checking for a traditional french locale... (cached) fr_FR
checking for a french Unicode locale... (cached) fr_FR.UTF-8
checking for a traditional french locale... (cached) fr_FR
checking for a turkish Unicode locale... tr_TR.UTF-8
checking whether dup works... yes
checking for error_at_line... yes
checking whether fdopen sets errno... yes
checking for getpagesize... yes
checking whether getpagesize is declared... yes
checking whether program_invocation_name is declared... yes
checking whether program_invocation_short_name is declared... yes
checking whether __argv is declared... no
checking for grantpt... yes
checking whether byte ordering is bigendian... (cached) no
checking whether byte ordering is bigendian... (cached) no
checking whether INT32_MAX < INTMAX_MAX... yes
checking whether INT64_MAX == LONG_MAX... yes
checking whether UINT32_MAX < UINTMAX_MAX... yes
checking whether UINT64_MAX == ULONG_MAX... yes
checking whether isnan(double) can be used without linking with libm... yes
checking where to find the exponent in a 'double'... (cached) word 1 bit 20
checking whether isnan(float) can be used without linking with libm... yes
checking whether isnan(float) works... yes
checking where to find the exponent in a 'float'... (cached) word 0 bit 23
checking whether isnan(long double) can be used without linking with libm... yes
checking whether isnanl works... yes
checking where to find the exponent in a 'long double'... word 2 bit 0
checking whether NAN macro works... yes
checking whether HUGE_VAL works... yes
checking for a traditional french locale... (cached) fr_FR
checking for a french Unicode locale... (cached) fr_FR.UTF-8
checking for a traditional japanese locale... (cached) ja_JP
checking for a transitional chinese locale... (cached) zh_CN.GB18030
checking for a french Unicode locale... (cached) fr_FR.UTF-8
checking for a traditional french locale... (cached) fr_FR
checking for a french Unicode locale... (cached) fr_FR.UTF-8
checking for a traditional japanese locale... (cached) ja_JP
checking for a transitional chinese locale... (cached) zh_CN.GB18030
checking for mmap... (cached) yes
checking for MAP_ANONYMOUS... yes
checking for library containing nanosleep... none required
checking for working nanosleep... no (mishandles large arguments)
checking for library containing if_nameindex... none required
checking for a traditional french locale... (cached) fr_FR
checking for a french Unicode locale... (cached) fr_FR.UTF-8
checking whether posix_spawn_file_actions_addclose works... yes
checking whether posix_spawn_file_actions_adddup2 works... yes
checking whether posix_spawn_file_actions_addopen works... yes
checking for ptsname... yes
checking whether ptsname sets errno on failure... yes
checking whether ptsname_r has the same signature as in glibc... yes
checking for putenv compatible with GNU and SVID... yes
checking for mmap... (cached) yes
checking for MAP_ANONYMOUS... yes
checking for a traditional french locale... (cached) fr_FR
checking for a french Unicode locale... (cached) fr_FR.UTF-8
checking for a traditional japanese locale... (cached) ja_JP
checking for a transitional chinese locale... (cached) zh_CN.GB18030
checking for signbit macro... yes
checking for signbit compiler built-ins... yes
checking for posix_spawnattr_t... yes
checking for posix_spawn_file_actions_t... yes
checking for mmap... (cached) yes
checking for MAP_ANONYMOUS... yes
checking whether symlink handles trailing slash correctly... yes
checking for pthread_atfork... yes
checking for unlockpt... yes
checking for waitid... yes
checking for a traditional french locale... (cached) fr_FR
checking for a french Unicode locale... (cached) fr_FR.UTF-8
checking for a traditional japanese locale... (cached) ja_JP
checking for a transitional chinese locale... (cached) zh_CN.GB18030
checking whether wctob works... yes
checking whether wctob is declared... yes
checking for uid_t in sys/types.h... (cached) yes
checking for sys/mkdev.h... (cached) no
checking for sys/sysmacros.h... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by gcc -std=gnu99... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
checking for how to mark DSO non-deletable at runtime... -Wl,-z -Wl,nodelete
checking for how to set DSO symbol versions... -Wl,--version-script=
checking whether C compiler handles -Werror -Wunknown-warning-option... no
checking whether the C compiler's -Wformat allows NULL strings... yes
checking whether pragma GCC diagnostic push works... yes
checking whether the C compiler's -Wlogical-op gives bogus warnings... no
checking whether gcc gives bogus warnings for -Wlogical-op... no
checking whether clang gives bogus warnings for -Wdouble-promotion... no
checking whether -Wno-missing-field-initializers is supported... yes
checking whether -Wno-missing-field-initializers is needed... no
checking whether -Wuninitialized is supported... yes
checking max safe object size... 9223372036854775807
checking whether C compiler handles -Wframe-larger-than=4096... yes
checking whether C compiler handles -Wframe-larger-than=32768... yes
checking whether C compiler handles -fno-common... yes
checking whether C compiler handles -W... yes
checking whether C compiler handles -Waddress... yes
checking whether C compiler handles -Waggressive-loop-optimizations... yes
checking whether C compiler handles -Wall... yes
checking whether C compiler handles -Wattribute-alias... no
checking whether C compiler handles -Wattributes... yes
checking whether C compiler handles -Wbad-function-cast... yes
checking whether C compiler handles -Wbool-compare... no
checking whether C compiler handles -Wbool-operation... no
checking whether C compiler handles -Wbuiltin-declaration-mismatch... no
checking whether C compiler handles -Wbuiltin-macro-redefined... yes
checking whether C compiler handles -Wcast-align... yes
checking whether C compiler handles -Wcast-align=strict... no
checking whether C compiler handles -Wcast-function-type... no
checking whether C compiler handles -Wchar-subscripts... yes
checking whether C compiler handles -Wclobbered... yes
checking whether C compiler handles -Wcomment... yes
checking whether C compiler handles -Wcomments... yes
checking whether C compiler handles -Wcoverage-mismatch... yes
checking whether C compiler handles -Wcpp... yes
checking whether C compiler handles -Wdangling-else... no
checking whether C compiler handles -Wdate-time... no
checking whether C compiler handles -Wdeprecated-declarations... yes
checking whether C compiler handles -Wdesignated-init... no
checking whether C compiler handles -Wdiscarded-array-qualifiers... no
checking whether C compiler handles -Wdiscarded-qualifiers... no
checking whether C compiler handles -Wdiv-by-zero... yes
checking whether C compiler handles -Wdouble-promotion... yes
checking whether C compiler handles -Wduplicated-cond... no
checking whether C compiler handles -Wduplicate-decl-specifier... no
checking whether C compiler handles -Wempty-body... yes
checking whether C compiler handles -Wendif-labels... yes
checking whether C compiler handles -Wexpansion-to-defined... no
checking whether C compiler handles -Wextra... yes
checking whether C compiler handles -Wformat-contains-nul... yes
checking whether C compiler handles -Wformat-extra-args... yes
checking whether C compiler handles -Wformat-security... yes
checking whether C compiler handles -Wformat-y2k... yes
checking whether C compiler handles -Wformat-zero-length... yes
checking whether C compiler handles -Wframe-address... no
checking whether C compiler handles -Wfree-nonheap-object... yes
checking whether C compiler handles -Whsa... no
checking whether C compiler handles -Wif-not-aligned... no
checking whether C compiler handles -Wignored-attributes... no
checking whether C compiler handles -Wignored-qualifiers... yes
checking whether C compiler handles -Wimplicit... yes
checking whether C compiler handles -Wimplicit-function-declaration... yes
checking whether C compiler handles -Wimplicit-int... yes
checking whether C compiler handles -Wincompatible-pointer-types... no
checking whether C compiler handles -Winit-self... yes
checking whether C compiler handles -Winline... yes
checking whether C compiler handles -Wint-conversion... no
checking whether C compiler handles -Wint-in-bool-context... no
checking whether C compiler handles -Wint-to-pointer-cast... yes
checking whether C compiler handles -Winvalid-memory-model... yes
checking whether C compiler handles -Winvalid-pch... yes
checking whether C compiler handles -Wlogical-not-parentheses... no
checking whether C compiler handles -Wlogical-op... yes
checking whether C compiler handles -Wmain... yes
checking whether C compiler handles -Wmaybe-uninitialized... yes
checking whether C compiler handles -Wmemset-elt-size... no
checking whether C compiler handles -Wmemset-transposed-args... no
checking whether C compiler handles -Wmisleading-indentation... no
checking whether C compiler handles -Wmissing-attributes... no
checking whether C compiler handles -Wmissing-braces... yes
checking whether C compiler handles -Wmissing-declarations... yes
checking whether C compiler handles -Wmissing-field-initializers... yes
checking whether C compiler handles -Wmissing-include-dirs... yes
checking whether C compiler handles -Wmissing-parameter-type... yes
checking whether C compiler handles -Wmissing-prototypes... yes
checking whether C compiler handles -Wmultichar... yes
checking whether C compiler handles -Wmultistatement-macros... no
checking whether C compiler handles -Wnarrowing... yes
checking whether C compiler handles -Wnested-externs... yes
checking whether C compiler handles -Wnonnull... yes
checking whether C compiler handles -Wnonnull-compare... no
checking whether C compiler handles -Wnull-dereference... no
checking whether C compiler handles -Wodr... no
checking whether C compiler handles -Wold-style-declaration... yes
checking whether C compiler handles -Wold-style-definition... yes
checking whether C compiler handles -Wopenmp-simd... no
checking whether C compiler handles -Woverflow... yes
checking whether C compiler handles -Woverride-init... yes
checking whether C compiler handles -Wpacked-bitfield-compat... yes
checking whether C compiler handles -Wpacked-not-aligned... no
checking whether C compiler handles -Wparentheses... yes
checking whether C compiler handles -Wpointer-arith... yes
checking whether C compiler handles -Wpointer-compare... no
checking whether C compiler handles -Wpointer-sign... yes
checking whether C compiler handles -Wpointer-to-int-cast... yes
checking whether C compiler handles -Wpragmas... yes
checking whether C compiler handles -Wpsabi... yes
checking whether C compiler handles -Wrestrict... no
checking whether C compiler handles -Wreturn-local-addr... yes
checking whether C compiler handles -Wreturn-type... yes
checking whether C compiler handles -Wscalar-storage-order... no
checking whether C compiler handles -Wsequence-point... yes
checking whether C compiler handles -Wshadow... yes
checking whether C compiler handles -Wshift-count-negative... no
checking whether C compiler handles -Wshift-count-overflow... no
checking whether C compiler handles -Wshift-negative-value... no
checking whether C compiler handles -Wsizeof-array-argument... no
checking whether C compiler handles -Wsizeof-pointer-div... no
checking whether C compiler handles -Wsizeof-pointer-memaccess... yes
checking whether C compiler handles -Wstrict-aliasing... yes
checking whether C compiler handles -Wstrict-prototypes... yes
checking whether C compiler handles -Wstringop-truncation... no
checking whether C compiler handles -Wsuggest-attribute=cold... no
checking whether C compiler handles -Wsuggest-attribute=const... yes
checking whether C compiler handles -Wsuggest-attribute=format... yes
checking whether C compiler handles -Wsuggest-attribute=malloc... no
checking whether C compiler handles -Wsuggest-attribute=noreturn... yes
checking whether C compiler handles -Wsuggest-attribute=pure... yes
checking whether C compiler handles -Wsuggest-final-methods... no
checking whether C compiler handles -Wsuggest-final-types... no
checking whether C compiler handles -Wswitch... yes
checking whether C compiler handles -Wswitch-bool... no
checking whether C compiler handles -Wswitch-unreachable... no
checking whether C compiler handles -Wsync-nand... yes
checking whether C compiler handles -Wtautological-compare... no
checking whether C compiler handles -Wtrampolines... yes
checking whether C compiler handles -Wtrigraphs... yes
checking whether C compiler handles -Wtype-limits... yes
checking whether C compiler handles -Wuninitialized... yes
checking whether C compiler handles -Wunknown-pragmas... yes
checking whether C compiler handles -Wunused... yes
checking whether C compiler handles -Wunused-but-set-parameter... yes
checking whether C compiler handles -Wunused-but-set-variable... yes
checking whether C compiler handles -Wunused-function... yes
checking whether C compiler handles -Wunused-label... yes
checking whether C compiler handles -Wunused-local-typedefs... yes
checking whether C compiler handles -Wunused-parameter... yes
checking whether C compiler handles -Wunused-result... yes
checking whether C compiler handles -Wunused-value... yes
checking whether C compiler handles -Wunused-variable... yes
checking whether C compiler handles -Wvarargs... yes
checking whether C compiler handles -Wvariadic-macros... yes
checking whether C compiler handles -Wvector-operation-performance... yes
checking whether C compiler handles -Wvolatile-register-var... yes
checking whether C compiler handles -Wwrite-strings... yes
checking whether C compiler handles -Walloc-size-larger-than=9223372036854775807... no
checking whether C compiler handles -Warray-bounds=2... no
checking whether C compiler handles -Wformat-overflow=2... no
checking whether C compiler handles -Wformat-truncation=2... no
checking whether C compiler handles -Wimplicit-fallthrough=5... no
checking whether C compiler handles -Wnormalized=nfc... yes
checking whether C compiler handles -Wshift-overflow=2... no
checking whether C compiler handles -Wstringop-overflow=2... no
checking whether C compiler handles -Wunused-const-variable=2... no
checking whether C compiler handles -Wvla-larger-than=4031... no
checking whether C compiler handles -Wno-sign-compare... yes
checking whether C compiler handles -Wno-cast-function-type... no
checking whether C compiler handles -Wjump-misses-init... yes
checking whether C compiler handles -Wswitch-enum... yes
checking whether C compiler handles -Wno-format-nonliteral... yes
checking whether C compiler handles -Wno-format-truncation... no
checking whether C compiler handles -fstack-protector-strong... yes
checking whether C compiler handles -fexceptions... yes
checking whether C compiler handles -fasynchronous-unwind-tables... yes
checking whether C compiler handles -fipa-pure-const... yes
checking whether C compiler handles -Wno-suggest-attribute=pure... yes
checking whether C compiler handles -Wno-suggest-attribute=const... yes
checking whether C compiler handles -Werror... yes
checking whether C compiler handles -fPIE -DPIE -pie... yes
checking for how to force completely read-only GOT table... -Wl,-z -Wl,relro -Wl,-z -Wl,now
checking for how to avoid indirect lib deps... -Wl,--no-copy-dt-needed-entries
checking for how to stop undefined symbols at link time... -Wl,-z -Wl,defs
checking sys/acl.h usability... yes
checking sys/acl.h presence... yes
checking for sys/acl.h... yes
checking for aa_change_profile in -lapparmor... no
checking for pthread_mutexattr_init... yes
checking for pthread.h... (cached) yes
checking whether pthread_sigmask does anything... yes
checking for atomic ops implementation... gcc
checking for getxattr in -lattr... yes
checking sys/xattr.h usability... yes
checking sys/xattr.h presence... yes
checking for sys/xattr.h... yes
checking for audit_encode_nv_string in -laudit... yes
checking libaudit.h usability... yes
checking libaudit.h presence... yes
checking for libaudit.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for AVAHI... yes
checking for library containing tgetent... -lncurses
checking whether rl_completion_quote_character is declared... yes
checking for readline in -lreadline... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking for rl_initialize in -lreadline... yes
checking for BASH_COMPLETION... no
checking for BLKID... yes
checking for capng_updatev in -lcap-ng... yes
checking cap-ng.h usability... yes
checking cap-ng.h presence... yes
checking for cap-ng.h... yes
checking for CURL... yes
checking for DBUS... yes
checking for dbus_watch_get_unix_fd... yes
checking for DBusBasicValue... yes
checking for DEVMAPPER... yes
checking for dlfcn.h... (cached) yes
checking for library containing dlopen... -ldl
checking for whether to install firewalld libvirt zone... yes
checking for FUSE... yes
checking for GLUSTERFS... yes
checking for GNUTLS... yes
checking for HAL... no
checking for LIBISCSI... no
checking for NETCF... yes
checking for ncf_change_begin... yes
checking whether to compile with macvtap support... yes
checking whether MACVLAN_MODE_PASSTHRU is declared... yes
checking for LIBNL... yes
checking for LIBNL_ROUTE3... yes
checking for LIBPARTED... yes
checking for parted... /sbin/parted
checking libpcap pcap-config >= 1.0.0 ... yes
checking for LIBSSH... no
checking for LIBXML... yes
checking for struct _xmlURI.query_raw... yes
checking whether to compile with macvtap support... yes
checking whether MACVLAN_MODE_PASSTHRU is declared... (cached) yes
checking for NETCF... yes
checking for ncf_change_begin... (cached) yes
checking for gettext... yes
checking for libintl.h... (cached) yes
checking for xgettext... xgettext
checking for msgfmt... msgfmt
checking for msgmerge... msgmerge
checking msgfmt is GNU tool... yes
checking for numa_available in -lnuma... yes
checking numa.h usability... yes
checking numa.h presence... yes
checking for numa.h... yes
checking for numa_bitmask_isbitset in -lnuma... yes
checking for OPENWSMAN... no
checking for PCIACCESS... yes
checking for init script type... systemd
checking for pkcheck... /usr/bin/pkcheck
checking for pthread_mutexattr_init... (cached) yes
checking for pthread.h... (cached) yes
checking whether pthread_sigmask does anything... (cached) yes
checking for library containing tgetent... (cached) -lncurses
checking whether rl_completion_quote_character is declared... (cached) yes
checking for readline in -lreadline... (cached) yes
checking for readline/readline.h... (cached) yes
checking for rl_initialize in -lreadline... (cached) yes
checking for sanlock_init in -lsanlock_client... yes
checking sanlock.h usability... yes
checking sanlock.h presence... yes
checking for sanlock.h... yes
checking whether SANLK_INQ_WAIT is declared... yes
checking for sanlock_killpath in -lsanlock_client... yes
checking for sanlock_inq_lockspace in -lsanlock_client... yes
checking for sanlock_write_lockspace in -lsanlock_client... yes
checking for sanlock_strerror in -lsanlock_client... yes
checking for sasl_client_init in -lsasl2... yes
checking sasl/sasl.h usability... yes
checking sasl/sasl.h presence... yes
checking for sasl/sasl.h... yes
checking for fgetfilecon_raw in -lselinux... yes
checking selinux/selinux.h usability... yes
checking selinux/selinux.h presence... yes
checking for selinux/selinux.h... yes
checking for selinux setcon parameter type... const
checking for selinux selabel_open parameter type... const
checking SELinux mount point... /sys/fs/selinux
checking selinux/label.h usability... yes
checking selinux/label.h presence... yes
checking for selinux/label.h... yes
checking for SSH2... no
checking for UDEV... yes
checking for udev_monitor_set_receive_buffer_size... yes
checking whether to compile with virtual port support... yes
checking for WIRESHARK_DISSECTOR... no
checking for xdrmem_create in -lportablexdr... no
checking for library containing xdrmem_create... none required
checking for xdr_u_int64_t... no
checking where to find <rpc/rpc.h>... none
checking for yajl_parse_complete in -lyajl... no
checking for yajl_tree_parse in -lyajl... yes
checking yajl/yajl_common.h usability... yes
checking yajl/yajl_common.h presence... yes
checking for yajl/yajl_common.h... yes
checking size of long... 8
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking libtasn1.h usability... yes
checking libtasn1.h presence... yes
checking for libtasn1.h... yes
checking linux/magic.h usability... yes
checking linux/magic.h presence... yes
checking for linux/magic.h... yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking net/ethernet.h usability... yes
checking net/ethernet.h presence... yes
checking for net/ethernet.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking for sys/sysctl.h... (cached) yes
checking sys/ucred.h usability... no
checking sys/ucred.h presence... no
checking for sys/ucred.h... no
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking whether htole64 is declared... yes
checking for stat... yes
checking for stat64... yes
checking for __xstat... yes
checking for __xstat64... yes
checking for lstat... (cached) yes
checking for lstat64... yes
checking for __lxstat... yes
checking for __lxstat64... yes
checking for struct ifreq... yes
checking for struct sockpeercred... no
checking whether ETH_FLAG_TXVLAN is declared... yes
checking whether ETH_FLAG_NTUPLE is declared... yes
checking whether ETH_FLAG_RXHASH is declared... yes
checking whether ETH_FLAG_LRO is declared... yes
checking whether ETHTOOL_GGSO is declared... yes
checking whether ETHTOOL_GGRO is declared... yes
checking whether ETHTOOL_GFLAGS is declared... yes
checking whether ETHTOOL_GFEATURES is declared... yes
checking whether ETHTOOL_SCOALESCE is declared... yes
checking whether ETHTOOL_GCOALESCE is declared... yes
checking whether SEEK_HOLE is declared... yes
checking for gettext in -lintl... no
checking for rpcgen... /usr/bin/rpcgen
checking for xmllint... /usr/bin/xmllint
checking for xsltproc... /usr/bin/xsltproc
checking for augparse... /usr/bin/augparse
checking whether ln -s works... yes
checking for dmidecode... /sbin/dmidecode
checking for dnsmasq... /sbin/dnsmasq
checking for radvd... /sbin/radvd
checking for tc... /sbin/tc
checking for udevadm... /usr/bin/udevadm
checking for udevsettle... no
checking for modprobe... /sbin/modprobe
checking for rmmod... /sbin/rmmod
checking for mm-ctl... mm-ctl
checking for ovs-vsctl... ovs-vsctl
checking for scrub... /usr/bin/scrub
checking for addr2line... /usr/bin/addr2line
checking for ip... /sbin/ip
checking for iptables... /sbin/iptables
checking for ip6tables... /sbin/ip6tables
checking for ebtables... /sbin/ebtables
checking for qemu-bridge-helper... /usr/libexec/qemu-bridge-helper
checking for qemu-pr-helper... /usr/bin/qemu-pr-helper
checking for xen_vm_start in -lxenserver... no
checking for LIBXL... no
checking for libxl_cpupool_cpuadd_cpumap in -lxenlight... no
checking whether LIBXL_DOMAIN_TYPE_PVH is declared... no
checking for PARALLELS_SDK... no
checking for bhyve... no
checking for bhyvectl... no
checking for bhyveload... no
checking for dtrace... /usr/bin/dtrace
checking for numad... /usr/bin/numad
checking for init script type... systemd
checking for whether to install sysctl config... yes
checking nss.h usability... yes
checking nss.h presence... yes
checking for nss.h... yes
checking for struct gaih_addrtuple... yes
checking for ns_mtab... no
checking for nss_module_unregister_fn... no
checking linux/kvm.h usability... yes
checking linux/kvm.h presence... yes
checking for linux/kvm.h... yes
checking whether <linux/*.h> and <netinet/*.h> headers are compatible... yes
checking for linux/param.h... yes
checking for linux/sockios.h... yes
checking for linux/if_bridge.h... yes
checking for linux/if_tun.h... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for selinux_virtual_domain_context_path... yes
checking for selinux_virtual_image_context_path... yes
checking for selinux_lxc_contexts_path... yes
checking for mntent.h... (cached) yes
checking for mount... /usr/bin/mount
checking for umount... /usr/bin/umount
checking for mkfs... /sbin/mkfs
checking for showmount... /sbin/showmount
checking for pvcreate... /sbin/pvcreate
checking for vgcreate... /sbin/vgcreate
checking for lvcreate... /sbin/lvcreate
checking for pvremove... /sbin/pvremove
checking for vgremove... /sbin/vgremove
checking for lvremove... /sbin/lvremove
checking for lvchange... /sbin/lvchange
checking for vgchange... /sbin/vgchange
checking for vgscan... /sbin/vgscan
checking for pvs... /sbin/pvs
checking for vgs... /sbin/vgs
checking for lvs... /sbin/lvs
checking for iscsiadm... /sbin/iscsiadm
checking rbd/librbd.h usability... yes
checking rbd/librbd.h presence... yes
checking for rbd/librbd.h... yes
checking for rbd_get_features... yes
checking for collie... no
checking for dog... no
checking for zfs... no
checking for zpool... no
checking for vstorage... no
checking for vstorage-mount... no
checking for umount... (cached) /usr/bin/umount
checking linux/btrfs.h usability... yes
checking linux/btrfs.h presence... yes
checking for linux/btrfs.h... yes
checking xfs/xfs.h usability... no
checking xfs/xfs.h presence... no
checking for xfs/xfs.h... no
checking linux/devlink.h usability... yes
checking linux/devlink.h presence... yes
checking for linux/devlink.h... yes
checking whether DEVLINK_CMD_ESWITCH_GET is declared... yes
checking whether VHOST_VSOCK_SET_GUEST_CID is declared... yes
checking for python3... /usr/bin/python3
checking for perl... /usr/bin/perl
checking Whether to build test suite by default... yes
checking whether GET_VLAN_VID_CMD is declared... yes
checking for struct ifreq.ifr_newname... yes
checking for struct ifreq.ifr_ifindex... yes
checking for struct ifreq.ifr_index... no
checking for struct ifreq.ifr_hwaddr... yes
checking whether BRDGSFD is declared... no
checking whether BRDGADD is declared... no
checking whether BRDGDEL is declared... no
checking whether cpuset_getaffinity is declared... no
checking for struct if_data.ifi_oqdrops... no
checking whether clock_serv_t is declared... no
checking whether host_get_clock_service is declared... no
checking whether clock_get_time is declared... no
checking whether this build is done by a static analysis tool... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating run
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating include/libvirt/Makefile
config.status: creating docs/Makefile
config.status: creating gnulib/lib/Makefile
config.status: creating gnulib/tests/Makefile
config.status: creating .color_coded
config.status: creating .ycm_extra_conf.py
config.status: creating libvirt.pc
config.status: creating libvirt-qemu.pc
config.status: creating libvirt-lxc.pc
config.status: creating libvirt-admin.pc
config.status: creating src/libvirt.pc
config.status: creating src/libvirt-qemu.pc
config.status: creating src/libvirt-lxc.pc
config.status: creating libvirt.spec
config.status: creating mingw-libvirt.spec
config.status: creating po/Makefile
config.status: creating include/libvirt/libvirt-common.h
config.status: creating examples/Makefile
config.status: creating tests/Makefile
config.status: creating tools/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: 
configure: Configuration summary
configure: =====================
configure: 
configure: Drivers
configure: 
configure:       QEMU: yes
configure:     OpenVZ: yes
configure:     VMware: yes
configure:       VBox: yes
configure:     XenAPI: no 
configure:      libxl: no 
configure:        LXC: yes
configure:       PHYP: no 
configure:        ESX: yes
configure:    Hyper-V: no 
configure:         vz: no 
configure:      Bhyve: no 
configure:       Test: yes
configure:     Remote: yes
configure:    Network: yes
configure:   Libvirtd: yes
configure:  Interface: yes
configure: 
configure: Storage Drivers
configure: 
configure:        Dir: yes
configure:         FS: yes
configure:      NetFS: yes
configure:        LVM: yes
configure:      iSCSI: yes
configure: iscsi-direct: no 
configure:       SCSI: yes
configure:      mpath: yes
configure:       Disk: yes
configure:        RBD: yes
configure:   Sheepdog: no 
configure:    Gluster: yes
configure:        ZFS: no 
configure: Virtuozzo storage: no 
configure: 
configure: Security Drivers
configure: 
configure:    SELinux: yes
configure:   AppArmor: no 
configure: 
configure: Driver Loadable Modules
configure: 
configure: driver_modules: yes (CFLAGS='' LIBS='-ldl')
configure: 
configure: Libraries
configure: 
configure:        acl: yes (CFLAGS='' LIBS='-lacl')
configure:   apparmor: no 
configure:       attr: yes (CFLAGS='' LIBS='-lattr')
configure:      audit: yes (CFLAGS='' LIBS='-laudit')
configure:      avahi: yes (CFLAGS='-D_REENTRANT  ' LIBS='-lavahi-common -lavahi-client  ')
configure: bash_completion: no 
configure:      blkid: yes (CFLAGS='-I/usr/include/blkid -I/usr/include/uuid  ' LIBS='-lblkid  ')
configure:      capng: yes (CFLAGS='' LIBS='-lcap-ng')
configure:       curl: yes (CFLAGS='-DCURL_DISABLE_TYPECHECK  ' LIBS='-lcurl  ')
configure:       dbus: yes (CFLAGS='-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include  ' LIBS='-ldbus-1  ')
configure:     dlopen: yes (CFLAGS='' LIBS='-ldl')
configure:  firewalld: yes (CFLAGS='' LIBS='')
configure: firewalld-zone: yes
configure:       fuse: yes (CFLAGS='-D_FILE_OFFSET_BITS=64 -I/usr/include/fuse  ' LIBS='-pthread -lfuse  ')
configure:  glusterfs: yes (CFLAGS='-D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -DUSE_POSIX_ACLS=1 -I/usr/include/glusterfs -I/usr/include/uuid  ' LIBS='-lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid  ')
configure:     gnutls: yes (CFLAGS='-I/usr/include/p11-kit-1  ' LIBS='-lgnutls  ')
configure:        hal: no 
configure:   libiscsi: no 
configure:      libnl: yes (CFLAGS='-I/usr/include/libnl3   -I/usr/include/libnl3  ' LIBS='-lnl-3   -lnl-route-3 -lnl-3  ')
configure:    libpcap: yes (CFLAGS='' LIBS='-lpcap')
configure:     libssh: no 
configure:      libxl: no 
configure:     libxml: yes (CFLAGS='-I/usr/include/libxml2  ' LIBS='-lxml2  ')
configure:    macvtap: yes (CFLAGS='' LIBS='')
configure:      netcf: yes (CFLAGS=' ' LIBS='-lnetcf  ')
configure:        NLS: yes
configure:        nss: yes
configure:    numactl: yes (CFLAGS='' LIBS='-lnuma')
configure:  openwsman: no 
configure:  pciaccess: yes (CFLAGS=' ' LIBS='-lpciaccess  ')
configure:   pm_utils: no 
configure:     polkit: yes
configure:        rbd: yes (CFLAGS='' LIBS='-lrbd -lrados')
configure:   readline: yes (CFLAGS='-D_FUNCTION_DEF ' LIBS='-lreadline')
configure:    sanlock: yes (CFLAGS='' LIBS='-lsanlock_client')
configure:       sasl: yes (CFLAGS='' LIBS='-lsasl2')
configure:    selinux: yes (CFLAGS='' LIBS='-lselinux')
configure:       ssh2: no 
configure:       udev: yes (CFLAGS=' ' LIBS='-ludev  ')
configure: virtualport: yes (CFLAGS='' LIBS='')
configure:        xdr: yes (CFLAGS='' LIBS='')
configure:     xenapi: no 
configure:       yajl: yes (CFLAGS='' LIBS='-lyajl')
configure: 
configure: Windows
configure: 
configure:     Cygwin: no 
configure:      MinGW: no 
configure:       MSVC: no 
configure:    windres: no 
configure: 
configure: Test suite
configure: 
configure:         Alloc OOM: no
configure: 
configure: Miscellaneous
configure: 
configure:              Debug: yes
configure:        Use -Werror: yes
configure:      Warning Flags:  -fno-common -W -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdeprecated-declarations -Wdiv-by-zero -Wdouble-promotion -Wempty-body -Wendif-labels -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wformat-zero-length -Wfree-nonheap-object -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Winline -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wold-style-declaration -Wold-style-definition -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wreturn-local-addr -Wreturn-type -Wsequence-point -Wshadow -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wswitch -Wsync-nand -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Wnormalized=nfc -Wno-sign-compare -Wjump-misses-init -Wswitch-enum -Wno-format-nonliteral -fstack-protector-strong -fexceptions -fasynchronous-unwind-tables -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Werror
configure:             DTrace: yes
configure:              numad: yes
configure:        Init script: systemd
configure:  Char device locks: /var/lock
configure:     Default Editor: vi
configure:       Loader/NVRAM: 
configure:   virt-login-shell: yes
configure: virt-host-validate: yes
configure:       TLS priority: NORMAL
configure: 
configure: Developer Tools
configure: 
configure: wireshark_dissector: no 
configure: 
configure: Privileges
configure: 
configure:       QEMU: root:root
configure: 
Now type 'make' to compile libvirt.
  GEN      spacing-check
  GEN      test-wrap-argv
  GEN      prohibit-duplicate-header
  GEN      mock-noinline
  GEN      group-qemu-caps
  GEN      header-ifdef
GFDL_version
0.78 GFDL_version
TAB_in_indentation
0.53 TAB_in_indentation
Wundef_boolean
0.08 Wundef_boolean
avoid_attribute_unused_in_header
0.23 avoid_attribute_unused_in_header
avoid_ctype_macros
0.53 avoid_ctype_macros
avoid_if_before_free
4.39 avoid_if_before_free
avoid_strcase
0.73 avoid_strcase
avoid_write
0.34 avoid_write
bindtextdomain
0.13 bindtextdomain
cast_of_argument_to_free
0.76 cast_of_argument_to_free
cast_of_x_alloc_return_value
0.66 cast_of_x_alloc_return_value
changelog
0.14 changelog
const_long_option
0.74 const_long_option
copyright_check
0.54 copyright_check
copyright_format
2.04 copyright_format
copyright_usage
1.86 copyright_usage
correct_id_types
0.95 correct_id_types
curly_braces_style
0.73 curly_braces_style
error_message_period
0.51 error_message_period
error_message_warn_fatal
0.54 error_message_warn_fatal
flags_debug
1.38 flags_debug
flags_usage
1.37 flags_usage
forbid_const_pointer_typedef
1.45 forbid_const_pointer_typedef
forbid_manual_xml_indent
0.72 forbid_manual_xml_indent
gettext_init
0.13 gettext_init
libvirt_unmarked_diagnostics
1.21 libvirt_unmarked_diagnostics
m4_quote_check
0.21 m4_quote_check
makefile_TAB_only_indentation
0.21 makefile_TAB_only_indentation
makefile_at_at_check
0.14 makefile_at_at_check
makefile_conditionals
0.21 makefile_conditionals
make -C src remote/remote_daemon_dispatch_stubs.h
make[1]: Entering directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
  GEN      remote/remote_daemon_dispatch_stubs.h
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
make -C src remote/remote_daemon_dispatch_qemu_stubs.h
make[1]: Entering directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
  GEN      remote/remote_daemon_dispatch_qemu_stubs.h
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
make -C src remote/remote_client_bodies.h
make[1]: Entering directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
  GEN      remote/remote_client_bodies.h
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
make -C src admin/admin_server_dispatch_stubs.h
make[1]: Entering directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
  GEN      admin/admin_server_dispatch_stubs.h
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
make -C src admin/admin_client.h
make[1]: Entering directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
  GEN      admin/admin_client.h
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-y5jj_ytm/src/src'
po_check
0.01 po_check
preprocessor_indentation
maint.mk: skipping test sc_preprocessor_indentation: cppi not installed
0.01 preprocessor_indentation
prohibit_HAVE_MBRTOWC
0.70 prohibit_HAVE_MBRTOWC
prohibit_PATH_MAX
0.73 prohibit_PATH_MAX
prohibit_VIR_ERR_NO_MEMORY
0.73 prohibit_VIR_ERR_NO_MEMORY
prohibit_access_xok
0.76 prohibit_access_xok
prohibit_always-defined_macros
2.77 prohibit_always-defined_macros
prohibit_always_true_header_tests
0.66 prohibit_always_true_header_tests
prohibit_argmatch_without_use
0.22 prohibit_argmatch_without_use
prohibit_asprintf
1.48 prohibit_asprintf
prohibit_assert_without_use
0.26 prohibit_assert_without_use
prohibit_atoi
0.84 prohibit_atoi
prohibit_author
0.69 prohibit_author
prohibit_backslash_alignment
src/datatypes.h:302:            !virObjectIsClass(virChkDom(_check), virDomainClass) ||     \
src/datatypes.h:313:# define virCheckDomainSnapshotReturn(obj, retval)      \
maint.mk: Do not attempt to right-align backslashes
make: *** [sc_prohibit_backslash_alignment] Error 1
real	11m0.192s
user	9m8.613s
sys	4m2.003s
=== OUTPUT END ===
Test command exited with code: 2
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
    On 3/15/19 12:17 AM, no-reply@patchew.org wrote:
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below:
Patchew maintainers: Can we get this to output just a useful tail rather than the entire log?
0.69 prohibit_author prohibit_backslash_alignment src/datatypes.h:302: !virObjectIsClass(virChkDom(_check), virDomainClass) || \ src/datatypes.h:313:# define virCheckDomainSnapshotReturn(obj, retval) \ maint.mk: Do not attempt to right-align backslashes make: *** [sc_prohibit_backslash_alignment] Error 1
Libvirt reviewers: Copied from pre-existing style, but I guess it means I should clean up the formatting while touching this. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On Fri, Mar 15, 2019 at 08:24:35AM -0500, Eric Blake wrote:
0.69 prohibit_author prohibit_backslash_alignment src/datatypes.h:302: !virObjectIsClass(virChkDom(_check), virDomainClass) || \ src/datatypes.h:313:# define virCheckDomainSnapshotReturn(obj, retval) \ maint.mk: Do not attempt to right-align backslashes make: *** [sc_prohibit_backslash_alignment] Error 1
Libvirt reviewers: Copied from pre-existing style, but I guess it means I should clean up the formatting while touching this.
I'd think pre-existing code is already correct otherwise syntax-check would be broken in git master. Perhaps this is a check we introduced after you copied the existing code when starting your work. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On 3/15/19 8:30 AM, Daniel P. Berrangé wrote:
On Fri, Mar 15, 2019 at 08:24:35AM -0500, Eric Blake wrote:
0.69 prohibit_author prohibit_backslash_alignment src/datatypes.h:302: !virObjectIsClass(virChkDom(_check), virDomainClass) || \ src/datatypes.h:313:# define virCheckDomainSnapshotReturn(obj, retval) \ maint.mk: Do not attempt to right-align backslashes make: *** [sc_prohibit_backslash_alignment] Error 1
Libvirt reviewers: Copied from pre-existing style, but I guess it means I should clean up the formatting while touching this.
I'd think pre-existing code is already correct otherwise syntax-check would be broken in git master. Perhaps this is a check we introduced after you copied the existing code when starting your work.
Yep, that turns out to be the case. (The penalty for taking 6 months to polish this into something worth committing...) -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On Fri, 03/15 08:24, Eric Blake wrote:
On 3/15/19 12:17 AM, no-reply@patchew.org wrote:
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below:
Patchew maintainers: Can we get this to output just a useful tail rather than the entire log?
The keywords in this report (full report is [1]) is not very clear (no "error:" along the actual error message). I'm not sure if the "grep_C" filtering (as implemented for short QEMU reports) can be used the same way. Paolo? Fam
0.69 prohibit_author prohibit_backslash_alignment src/datatypes.h:302: !virObjectIsClass(virChkDom(_check), virDomainClass) || \ src/datatypes.h:313:# define virCheckDomainSnapshotReturn(obj, retval) \ maint.mk: Do not attempt to right-align backslashes make: *** [sc_prohibit_backslash_alignment] Error 1
Libvirt reviewers: Copied from pre-existing style, but I guess it means I should clean up the formatting while touching this.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On Mar 17, 2019, at 10:26, Fam Zheng <fam@euphon.net> wrote:
On Fri, 03/15 08:24, Eric Blake wrote:
On 3/15/19 12:17 AM, no-reply@patchew.org wrote:
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below:
Patchew maintainers: Can we get this to output just a useful tail rather than the entire log?
The keywords in this report (full report is [1]) is not very clear (no "error:" along the actual error message). I'm not sure if the "grep_C" filtering (as implemented for short QEMU reports) can be used the same way. Paolo?
[1]: https://patchew.org/Libvirt/20190315050233.10782-1-eblake@redhat.com/
Fam
0.69 prohibit_author prohibit_backslash_alignment src/datatypes.h:302: !virObjectIsClass(virChkDom(_check), virDomainClass) || \ src/datatypes.h:313:# define virCheckDomainSnapshotReturn(obj, retval) \ maint.mk: Do not attempt to right-align backslashes make: *** [sc_prohibit_backslash_alignment] Error 1
Libvirt reviewers: Copied from pre-existing style, but I guess it means I should clean up the formatting while touching this.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On 17/03/19 03:26, Fam Zheng wrote:
On Fri, 03/15 08:24, Eric Blake wrote:
On 3/15/19 12:17 AM, no-reply@patchew.org wrote:
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below:
Patchew maintainers: Can we get this to output just a useful tail rather than the entire log?
The keywords in this report (full report is [1]) is not very clear (no "error:" along the actual error message). I'm not sure if the "grep_C" filtering (as implemented for short QEMU reports) can be used the same way. Paolo?
What about trimming the output to only include lines between "Now type 'make' to compile libvirt." and "make: ***"? That should be doable with "lines_between". Paolo
On Sun, Mar 17, 2019 at 10:26:21AM +0800, Fam Zheng wrote:
On Fri, 03/15 08:24, Eric Blake wrote:
On 3/15/19 12:17 AM, no-reply@patchew.org wrote:
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below:
Patchew maintainers: Can we get this to output just a useful tail rather than the entire log?
The keywords in this report (full report is [1]) is not very clear (no "error:" along the actual error message). I'm not sure if the "grep_C" filtering (as implemented for short QEMU reports) can be used the same way. Paolo?
Patchew is running a series of commands here: time bash -c './autogen.sh && make syntax-check' The bulk of the output is from the first command which succeeded. Is it possible for patchew to capture output from the commands separately, or reliably split it in some manner ? Or can we just make the emails only include the last 100 lines of output. In the few cases where this is probably not sufficient, there's still the option of seeing the full log online at patchew.org Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On 18/03/19 11:22, Daniel P. Berrangé wrote:
Or can we just make the emails only include the last 100 lines of output. In the few cases where this is probably not sufficient, there's still the option of seeing the full log online at patchew.org
Ok, I configured the emails to do that. https://patchew.org/Libvirt/20190317041317.4793-1-eblake@redhat.com/ should get a new (and hopefully shorter) report soon. Paolo
As explained in the previous patch, collecting pointer typedefs into a common header makes it easier to avoid circular inclusions. Continue the efforts by pulling the appropriate typedefs from capabilities.h into the new header. This patch is just straight code motion (all typedefs are listed in the same order before and after the patch); a later patch will sort things for legibility. Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/capabilities.h | 45 ++--------------------------- src/conf/virconftypes.h | 63 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 43 deletions(-) diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index cca1a20949..a6331b081c 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -1,7 +1,7 @@ /* * capabilities.h: hypervisor capabilities * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * Copyright (C) 2006-2008 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ # define LIBVIRT_CAPABILITIES_H # include "internal.h" +# include "virconftypes.h" # include "virbuffer.h" # include "cpu_conf.h" # include "virarch.h" @@ -32,24 +33,18 @@ # include <libxml/xpath.h> -typedef struct _virCapsGuestFeature virCapsGuestFeature; -typedef virCapsGuestFeature *virCapsGuestFeaturePtr; struct _virCapsGuestFeature { char *name; bool defaultOn; bool toggle; }; -typedef struct _virCapsGuestMachine virCapsGuestMachine; -typedef virCapsGuestMachine *virCapsGuestMachinePtr; struct _virCapsGuestMachine { char *name; char *canonical; unsigned int maxCpus; }; -typedef struct _virCapsGuestDomainInfo virCapsGuestDomainInfo; -typedef virCapsGuestDomainInfo *virCapsGuestDomainInfoPtr; struct _virCapsGuestDomainInfo { char *emulator; char *loader; @@ -57,15 +52,11 @@ struct _virCapsGuestDomainInfo { virCapsGuestMachinePtr *machines; }; -typedef struct _virCapsGuestDomain virCapsGuestDomain; -typedef virCapsGuestDomain *virCapsGuestDomainPtr; struct _virCapsGuestDomain { int type; /* virDomainVirtType */ virCapsGuestDomainInfo info; }; -typedef struct _virCapsGuestArch virCapsGuestArch; -typedef virCapsGuestArch *virCapsGuestArchptr; struct _virCapsGuestArch { virArch id; unsigned int wordsize; @@ -75,8 +66,6 @@ struct _virCapsGuestArch { virCapsGuestDomainPtr *domains; }; -typedef struct _virCapsGuest virCapsGuest; -typedef virCapsGuest *virCapsGuestPtr; struct _virCapsGuest { int ostype; virCapsGuestArch arch; @@ -85,8 +74,6 @@ struct _virCapsGuest { virCapsGuestFeaturePtr *features; }; -typedef struct _virCapsHostNUMACellCPU virCapsHostNUMACellCPU; -typedef virCapsHostNUMACellCPU *virCapsHostNUMACellCPUPtr; struct _virCapsHostNUMACellCPU { unsigned int id; unsigned int socket_id; @@ -94,22 +81,16 @@ struct _virCapsHostNUMACellCPU { virBitmapPtr siblings; }; -typedef struct _virCapsHostNUMACellSiblingInfo virCapsHostNUMACellSiblingInfo; -typedef virCapsHostNUMACellSiblingInfo *virCapsHostNUMACellSiblingInfoPtr; struct _virCapsHostNUMACellSiblingInfo { int node; /* foreign NUMA node */ unsigned int distance; /* distance to the node */ }; -typedef struct _virCapsHostNUMACellPageInfo virCapsHostNUMACellPageInfo; -typedef virCapsHostNUMACellPageInfo *virCapsHostNUMACellPageInfoPtr; struct _virCapsHostNUMACellPageInfo { unsigned int size; /* page size in kibibytes */ unsigned long long avail; /* the size of pool */ }; -typedef struct _virCapsHostNUMACell virCapsHostNUMACell; -typedef virCapsHostNUMACell *virCapsHostNUMACellPtr; struct _virCapsHostNUMACell { int num; int ncpus; @@ -121,15 +102,11 @@ struct _virCapsHostNUMACell { virCapsHostNUMACellPageInfoPtr pageinfo; }; -typedef struct _virCapsHostSecModelLabel virCapsHostSecModelLabel; -typedef virCapsHostSecModelLabel *virCapsHostSecModelLabelPtr; struct _virCapsHostSecModelLabel { char *type; char *label; }; -typedef struct _virCapsHostSecModel virCapsHostSecModel; -typedef virCapsHostSecModel *virCapsHostSecModelPtr; struct _virCapsHostSecModel { char *model; char *doi; @@ -137,8 +114,6 @@ struct _virCapsHostSecModel { virCapsHostSecModelLabelPtr labels; }; -typedef struct _virCapsHostCacheBank virCapsHostCacheBank; -typedef virCapsHostCacheBank *virCapsHostCacheBankPtr; struct _virCapsHostCacheBank { unsigned int id; unsigned int level; /* 1=L1, 2=L2, 3=L3, etc. */ @@ -149,8 +124,6 @@ struct _virCapsHostCacheBank { virResctrlInfoPerCachePtr *controls; }; -typedef struct _virCapsHostCache virCapsHostCache; -typedef virCapsHostCache *virCapsHostCachePtr; struct _virCapsHostCache { size_t nbanks; virCapsHostCacheBankPtr *banks; @@ -158,16 +131,12 @@ struct _virCapsHostCache { virResctrlInfoMonPtr monitor; }; -typedef struct _virCapsHostMemBWNode virCapsHostMemBWNode; -typedef virCapsHostMemBWNode *virCapsHostMemBWNodePtr; struct _virCapsHostMemBWNode { unsigned int id; virBitmapPtr cpus; /* All CPUs that belong to this node*/ virResctrlInfoMemBWPerNode control; }; -typedef struct _virCapsHostMemBW virCapsHostMemBW; -typedef virCapsHostMemBW *virCapsHostMemBWPtr; struct _virCapsHostMemBW { size_t nnodes; virCapsHostMemBWNodePtr *nodes; @@ -175,8 +144,6 @@ struct _virCapsHostMemBW { virResctrlInfoMonPtr monitor; }; -typedef struct _virCapsHost virCapsHost; -typedef virCapsHost *virCapsHostPtr; struct _virCapsHost { virArch arch; size_t nfeatures; @@ -211,8 +178,6 @@ struct _virCapsHost { bool iommu; }; -typedef struct _virCapsStoragePool virCapsStoragePool; -typedef virCapsStoragePool *virCapsStoragePoolPtr; struct _virCapsStoragePool { int type; }; @@ -224,8 +189,6 @@ typedef void (*virDomainDefNamespaceFree)(void *); typedef int (*virDomainDefNamespaceXMLFormat)(virBufferPtr, void *); typedef const char *(*virDomainDefNamespaceHref)(void); -typedef struct _virDomainXMLNamespace virDomainXMLNamespace; -typedef virDomainXMLNamespace *virDomainXMLNamespacePtr; struct _virDomainXMLNamespace { virDomainDefNamespaceParse parse; virDomainDefNamespaceFree free; @@ -233,8 +196,6 @@ struct _virDomainXMLNamespace { virDomainDefNamespaceHref href; }; -typedef struct _virCaps virCaps; -typedef virCaps *virCapsPtr; struct _virCaps { virObject parent; @@ -248,8 +209,6 @@ struct _virCaps { virCapsStoragePoolPtr *pools; }; -typedef struct _virCapsDomainData virCapsDomainData; -typedef virCapsDomainData *virCapsDomainDataPtr; struct _virCapsDomainData { int ostype; int arch; diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index 020aa70422..88e7c7083b 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -274,4 +274,67 @@ typedef virDomainXMLPrivateDataCallbacks *virDomainXMLPrivateDataCallbacksPtr; typedef struct _virDomainABIStability virDomainABIStability; typedef virDomainABIStability *virDomainABIStabilityPtr; +typedef struct _virCapsGuestFeature virCapsGuestFeature; +typedef virCapsGuestFeature *virCapsGuestFeaturePtr; + +typedef struct _virCapsGuestMachine virCapsGuestMachine; +typedef virCapsGuestMachine *virCapsGuestMachinePtr; + +typedef struct _virCapsGuestDomainInfo virCapsGuestDomainInfo; +typedef virCapsGuestDomainInfo *virCapsGuestDomainInfoPtr; + +typedef struct _virCapsGuestDomain virCapsGuestDomain; +typedef virCapsGuestDomain *virCapsGuestDomainPtr; + +typedef struct _virCapsGuestArch virCapsGuestArch; +typedef virCapsGuestArch *virCapsGuestArchptr; + +typedef struct _virCapsGuest virCapsGuest; +typedef virCapsGuest *virCapsGuestPtr; + +typedef struct _virCapsHostNUMACellCPU virCapsHostNUMACellCPU; +typedef virCapsHostNUMACellCPU *virCapsHostNUMACellCPUPtr; + +typedef struct _virCapsHostNUMACellSiblingInfo virCapsHostNUMACellSiblingInfo; +typedef virCapsHostNUMACellSiblingInfo *virCapsHostNUMACellSiblingInfoPtr; + +typedef struct _virCapsHostNUMACellPageInfo virCapsHostNUMACellPageInfo; +typedef virCapsHostNUMACellPageInfo *virCapsHostNUMACellPageInfoPtr; + +typedef struct _virCapsHostNUMACell virCapsHostNUMACell; +typedef virCapsHostNUMACell *virCapsHostNUMACellPtr; + +typedef struct _virCapsHostSecModelLabel virCapsHostSecModelLabel; +typedef virCapsHostSecModelLabel *virCapsHostSecModelLabelPtr; + +typedef struct _virCapsHostSecModel virCapsHostSecModel; +typedef virCapsHostSecModel *virCapsHostSecModelPtr; + +typedef struct _virCapsHostCacheBank virCapsHostCacheBank; +typedef virCapsHostCacheBank *virCapsHostCacheBankPtr; + +typedef struct _virCapsHostCache virCapsHostCache; +typedef virCapsHostCache *virCapsHostCachePtr; + +typedef struct _virCapsHostMemBWNode virCapsHostMemBWNode; +typedef virCapsHostMemBWNode *virCapsHostMemBWNodePtr; + +typedef struct _virCapsHostMemBW virCapsHostMemBW; +typedef virCapsHostMemBW *virCapsHostMemBWPtr; + +typedef struct _virCapsHost virCapsHost; +typedef virCapsHost *virCapsHostPtr; + +typedef struct _virCapsStoragePool virCapsStoragePool; +typedef virCapsStoragePool *virCapsStoragePoolPtr; + +typedef struct _virDomainXMLNamespace virDomainXMLNamespace; +typedef virDomainXMLNamespace *virDomainXMLNamespacePtr; + +typedef struct _virCaps virCaps; +typedef virCaps *virCapsPtr; + +typedef struct _virCapsDomainData virCapsDomainData; +typedef virCapsDomainData *virCapsDomainDataPtr; + #endif /* LIBVIRT_VIRCONFTYPES_H */ -- 2.20.1
On Fri, Mar 15, 2019 at 10:06:58AM -0500, Eric Blake wrote:
As explained in the previous patch, collecting pointer typedefs into a common header makes it easier to avoid circular inclusions. Continue the efforts by pulling the appropriate typedefs from capabilities.h into the new header.
This patch is just straight code motion (all typedefs are listed in the same order before and after the patch); a later patch will sort things for legibility.
Signed-off-by: Eric Blake <eblake@redhat.com> --- src/conf/capabilities.h | 45 ++--------------------------- src/conf/virconftypes.h | 63 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 43 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
On 3/15/19 12:02 AM, Eric Blake wrote:
This is a respin of patch 4/20 in my larger series: https://www.redhat.com/archives/libvir-list/2019-March/msg00386.html
As John pointed out, my v4/v5 posting had a LOT of duplicate code, including lots of poorly commented code managing a potential tree of checkpoints (even if the more immediate use tends to be a linear chain than a full-blown tree), all because I had copied-and-pasted from snapshot code. Copy-and-paste is technical debt; better is to get rid of the debt by refactoring the code for easy reuse.
1-6 (including 1.5) had sufficient reviews; I'm pushing 1-5 now, and saving 6 until I can figure out if I can build src/vz (I'm trying to locate the parallels-sdk required by m4/virt-driver-vz.m4, either pre-built for Fedora, or that I can build myself). 7-8 will be respun, along with my next round of cleaned up patches, to appear later today (I hope). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
participants (6)
- 
                
Daniel P. Berrangé - 
                
Eric Blake - 
                
Fam Zheng - 
                
Ján Tomko - 
                
no-reply@patchew.org - 
                
Paolo Bonzini