[libvirt] [PATCH v2 0/5] Extend apparmor rules for libvirt 4.6
by Christian Ehrhardt
Hi,
this is a summary of things I had to touch recently for libvirt 4.6.
The first two patches are re-submissions and modifications of last
year which were never totally challenged, but also not pushed.
The first was lost in a discussion about virt-aa-helper, whicih eventually
turned out to be clear that it could not help in that case.
- https://www.redhat.com/archives/libvir-list/2017-February/msg01598.html
- https://www.redhat.com/archives/libvir-list/2017-March/msg00052.html
The second even got a few Acks, but neither made it into upstream yet.
Parts of it where introduced already, in
7edcbd02 apparmor: allow libvirt to send term signal to unconfined
b482925c apparmor: support ptrace checks
But there are still signals blocked with those rules, so I resubmit the
remaining bit. Also I added the Acks to the resubmission.
The third&fourth change came in recently via various bug reports which I
finally wanted to adress - e.g. for ceph lib or smb. If we later on spot
more cases that have predictable safe paths under /tmp we can add those.
Finally the fifth change was triggered by me testing libvirt 4.6 in
various conditions. Some of them were in containers, and the new libvirt
behavior to carry more mount points into the qemu namespace triggers the
need to rewrite the existing mount-moving rules that we added last year.
*Updates in V2*
- added Acks to path #1
- split former patch #3 into #3/#4 to discuss /tmp access and qemu-smd
individually
- rewrote reasoning and concerns as well as TODOs to improve later in
regard to the /tmp related commits #3/#4
- Updated the rule since the trailing {,/} is not needed after **
Christian Ehrhardt (5):
apparmor: allow openGraphicsFD for virt manager >1.4
apparmor: add mediation rules for unconfined guests
apparmor: allow expected /tmp access patterns
apparmor: allow qemu-smb access in /tmp
apparmor: allow to preserve /dev mountpoints into qemu namespaces
examples/apparmor/libvirt-qemu | 20 ++++++++++++++++++++
examples/apparmor/usr.sbin.libvirtd | 24 +++++++++++++-----------
2 files changed, 33 insertions(+), 11 deletions(-)
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] spec: Add firmware/nvram paths for edk2 arm and ia32
by Cole Robinson
And clarify the comments to instead mention the package names
that provide these files
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
libvirt.spec.in | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 3edb60d2d2..f3d5c032af 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1132,14 +1132,22 @@ exit 1
%define arg_selinux_mount --with-selinux-mount="/sys/fs/selinux"
%if 0%{?fedora}
- # Nightly firmware repo x86/OVMF
+ # Nightly edk2.git-ovmf-x64
LOADERS="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd"
- # Nightly firmware repo aarch64/AAVMF
+ # Nightly edk2.git-ovmf-ia32
+ LOADERS="/usr/share/edk2.git/ovmf-ia32/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd"
+ # Nightly edk2.git-aarch64
LOADERS="$LOADERS:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
- # Fedora official x86/OVMF
+ # Nightly edk2.git-arm
+ LOADERS="$LOADERS:/usr/share/edk2.git/arm/QEMU_EFI-pflash.raw:/usr/share/edk2.git/arm/vars-template-pflash.raw"
+ # Fedora edk2-ovmf
LOADERS="$LOADERS:/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd"
- # Fedora official aarch64/AAVMF
+ # Fedora edk2-ovmf-ia32
+ LOADERS="$LOADERS:/usr/share/edk2/ovmf-ia32/OVMF_CODE.fd:/usr/share/edk2/ovmf-ia32/OVMF_VARS.fd"
+ # Fedora edk2-aarch64
LOADERS="$LOADERS:/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw"
+ # Fedora edk2-arm
+ LOADERS="$LOADERS:/usr/share/edk2/arm/QEMU_EFI-pflash.raw:/usr/share/edk2/arm/vars-template-pflash.raw"
%define arg_loader_nvram --with-loader-nvram="$LOADERS"
%endif
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] qemu_command: Fix memleak in qemuBuildFloppyCommandLineControllerOptions
by Michal Privoznik
Even though the buffer is passed to virCommand we still need to
free it.
==191201== 1,010 bytes in 1 blocks are definitely lost in loss record 826 of 836
==191201== at 0x4C2CE3F: malloc (vg_replace_malloc.c:298)
==191201== by 0x4C2F1BF: realloc (vg_replace_malloc.c:785)
==191201== by 0x5D39E82: virReallocN (viralloc.c:245)
==191201== by 0x5D3E8F2: virBufferGrow (virbuffer.c:150)
==191201== by 0x5D3E9C8: virBufferAdd (virbuffer.c:185)
==191201== by 0x56EAC98: qemuBuildFloppyCommandLineControllerOptions (qemu_command.c:2162)
==191201== by 0x56EB3E1: qemuBuildDisksCommandLine (qemu_command.c:2370)
==191201== by 0x570055E: qemuBuildCommandLine (qemu_command.c:10315)
==191201== by 0x575EA7F: qemuProcessCreatePretendCmd (qemu_process.c:6777)
==191201== by 0x113DAB: testCompareXMLToArgv (qemuxml2argvtest.c:598)
==191201== by 0x13A75B: virTestRun (testutils.c:180)
==191201== by 0x138BE8: mymain (qemuxml2argvtest.c:2975)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_command.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index ddb90895e0..96fc360f4a 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2225,6 +2225,7 @@ qemuBuildFloppyCommandLineControllerOptions(virCommandPtr cmd,
VIR_FREE(backendAlias);
VIR_FREE(backendStr);
VIR_FREE(bootindexStr);
+ virBufferFreeAndReset(&fdc_opts);
return ret;
}
--
2.16.4
6 years, 4 months
[libvirt] [PATCH v2 0/6] fdaskljrew
by Simon Kobyda
rpdwrewrewr
Simon Kobyda (6):
vsh: Add API for printing tables.
virsh: Implement new table API for virsh list
vsh: Added tests
virsh: Implement vsh-table to iface-list
virsh: Implement vshTable API to net-list and net-dhcp-leases
virsh: Implement vshTable API to secret-list
tests/Makefile.am | 8 +
tests/virshtest.c | 14 +-
tests/vshtabletest.c | 247 +++++++++++++++++++++
tools/Makefile.am | 4 +-
tools/virsh-domain-monitor.c | 43 ++--
tools/virsh-interface.c | 27 ++-
tools/virsh-network.c | 50 +++--
tools/virsh-secret.c | 30 ++-
tools/vsh-table.c | 413 +++++++++++++++++++++++++++++++++++
tools/vsh-table.h | 42 ++++
10 files changed, 817 insertions(+), 61 deletions(-)
create mode 100644 tests/vshtabletest.c
create mode 100644 tools/vsh-table.c
create mode 100644 tools/vsh-table.h
--
2.17.1
6 years, 4 months
[libvirt] [PATCH 0/5] qemu: Get rid of QEMU_CAPS_ADD_FD
by Peter Krempa
The fallout was slightly larger than expected.
Peter Krempa (5):
tests: qemuxml2argvmock: Don't mock virCommandPassFD
qemu: command: Extract opening of TPM backend FDs for mocking purposes
tests: qemuxml2argv: modernize TPM passthrough tests
qemu: capabilities: Always assume QEMU_CAPS_ADD_FD
FIXUP: renumber replies lines after deleting section
src/qemu/qemu_capabilities.c | 17 --
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 69 ++++---
src/qemu/qemu_command.h | 7 +
.../qemucapabilitiesdata/caps_1.5.3.x86_64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_1.6.0.x86_64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_1.7.0.x86_64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.1.1.x86_64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 3 +-
.../caps_2.10.0.aarch64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.10.0.ppc64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 3 +-
.../caps_2.10.0.x86_64.replies | 201 +++++++++----------
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 173 ++++++++---------
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 3 +-
.../caps_2.11.0.x86_64.replies | 201 +++++++++----------
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 3 +-
.../caps_2.12.0.aarch64.replies | 177 ++++++++---------
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.12.0.ppc64.replies | 177 ++++++++---------
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.12.0.s390x.replies | 181 ++++++++---------
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 3 +-
.../caps_2.12.0.x86_64.replies | 213 ++++++++++-----------
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 181 ++++++++---------
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 185 ++++++++----------
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 3 +-
.../caps_2.6.0.aarch64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.6.0.ppc64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 185 ++++++++----------
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.7.0.s390x.replies | 161 +++++++---------
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 3 +-
.../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 185 ++++++++----------
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 3 +-
.../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 185 ++++++++----------
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.9.0.ppc64.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 3 +-
.../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 169 ++++++++--------
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 3 +-
.../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 201 +++++++++----------
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 3 +-
.../qemucapabilitiesdata/caps_3.0.0.ppc64.replies | 177 ++++++++---------
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 3 +-
.../qemucapabilitiesdata/caps_3.0.0.x86_64.replies | 213 ++++++++++-----------
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 3 +-
tests/qemuxml2argvdata/tpm-passthrough-crb.args | 5 +-
tests/qemuxml2argvdata/tpm-passthrough.args | 5 +-
tests/qemuxml2argvmock.c | 24 ++-
63 files changed, 2371 insertions(+), 2866 deletions(-)
--
2.16.2
6 years, 4 months
[libvirt] [PATCH 0/4] cpu: modularize the CPU map data file
by Daniel P. Berrangé
Currently we have a cpu_map.xml file that contains all the features and
CPU models for all architectures in one place. I frequently find myself
wondering about the differences between CPU models, but it is hard to
compare them as the list of features is huge.
With this patch series we end up with a large set of small files, one
per named CPU model, along with one for the feature and vendor
definitions
cpu_map_ppc64_POWER6.xml
cpu_map_ppc64_POWER7.xml
cpu_map_ppc64_POWER8.xml
cpu_map_ppc64_POWER9.xml
cpu_map_ppc64_POWERPC_e5500.xml
cpu_map_ppc64_POWERPC_e6500.xml
cpu_map_ppc64_vendors.xml
cpu_map_x86_486.xml
cpu_map_x86_athlon.xml
cpu_map_x86_Broadwell-IBRS.xml
cpu_map_x86_Broadwell-noTSX-IBRS.xml
cpu_map_x86_Broadwell-noTSX.xml
cpu_map_x86_Broadwell.xml
cpu_map_x86_Conroe.xml
cpu_map_x86_core2duo.xml
cpu_map_x86_coreduo.xml
cpu_map_x86_cpu64-rhel5.xml
cpu_map_x86_cpu64-rhel6.xml
cpu_map_x86_EPYC-IBRS.xml
cpu_map_x86_EPYC.xml
cpu_map_x86_features.xml
cpu_map_x86_Haswell-IBRS.xml
cpu_map_x86_Haswell-noTSX-IBRS.xml
cpu_map_x86_Haswell-noTSX.xml
cpu_map_x86_Haswell.xml
cpu_map_x86_IvyBridge-IBRS.xml
cpu_map_x86_IvyBridge.xml
cpu_map_x86_kvm32.xml
cpu_map_x86_kvm64.xml
cpu_map_x86_n270.xml
cpu_map_x86_Nehalem-IBRS.xml
cpu_map_x86_Nehalem.xml
cpu_map_x86_Opteron_G1.xml
cpu_map_x86_Opteron_G2.xml
cpu_map_x86_Opteron_G3.xml
cpu_map_x86_Opteron_G4.xml
cpu_map_x86_Opteron_G5.xml
cpu_map_x86_Penryn.xml
cpu_map_x86_pentium2.xml
cpu_map_x86_pentium3.xml
cpu_map_x86_pentiumpro.xml
cpu_map_x86_pentium.xml
cpu_map_x86_phenom.xml
cpu_map_x86_qemu32.xml
cpu_map_x86_qemu64.xml
cpu_map_x86_SandyBridge-IBRS.xml
cpu_map_x86_SandyBridge.xml
cpu_map_x86_Skylake-Client-IBRS.xml
cpu_map_x86_Skylake-Client.xml
cpu_map_x86_Skylake-Server-IBRS.xml
cpu_map_x86_Skylake-Server.xml
cpu_map_x86_vendors.xml
cpu_map_x86_Westmere-IBRS.xml
cpu_map_x86_Westmere.xml
The main cpu_map.xml file is now just a list of <include filename="XXX"/>
statements to pull in the individual files
Now we can easily see the differences in each model:
$ diff cpu_map_x86_Broadwell.xml cpu_map_x86_Skylake-Client.xml
2,3c2,3
< <model name='Broadwell'>
< <signature family='6' model='61'/>
---
> <model name='Skylake-Client'>
> <signature family='6' model='94'/>
5a6
> <feature name='abm'/>
8a10
> <feature name='arat'/>
18a21
> <feature name='f16c'/>
30a34
> <feature name='mpx'/>
42a47
> <feature name='rdrand'/>
56a62
> <feature name='vme'/>
57a64
> <feature name='xgetbv1'/>
58a66,67
> <feature name='xsavec'/>
> <feature name='xsaveopt'/>
Daniel P. Berrangé (4):
cpu: allow include files for CPU definition
cpu: push more parsing logic into common code
cpu: split PPC64 map data into separate files
cpu: split x86 map data into separate files
libvirt.spec.in | 2 +-
mingw-libvirt.spec.in | 4 +-
src/Makefile.am | 2 +-
src/cpu/cpu_map.c | 160 +-
src/cpu/cpu_map.h | 22 +-
src/cpu/cpu_map.xml | 2415 +-----------------
src/cpu/cpu_map_ppc64_POWER6.xml | 6 +
src/cpu/cpu_map_ppc64_POWER7.xml | 7 +
src/cpu/cpu_map_ppc64_POWER8.xml | 8 +
src/cpu/cpu_map_ppc64_POWER9.xml | 6 +
src/cpu/cpu_map_ppc64_POWERPC_e5500.xml | 6 +
src/cpu/cpu_map_ppc64_POWERPC_e6500.xml | 6 +
src/cpu/cpu_map_ppc64_vendors.xml | 4 +
src/cpu/cpu_map_x86_486.xml | 7 +
src/cpu/cpu_map_x86_Broadwell-IBRS.xml | 61 +
src/cpu/cpu_map_x86_Broadwell-noTSX-IBRS.xml | 59 +
src/cpu/cpu_map_x86_Broadwell-noTSX.xml | 58 +
src/cpu/cpu_map_x86_Broadwell.xml | 60 +
src/cpu/cpu_map_x86_Conroe.xml | 33 +
src/cpu/cpu_map_x86_EPYC-IBRS.xml | 73 +
src/cpu/cpu_map_x86_EPYC.xml | 72 +
src/cpu/cpu_map_x86_Haswell-IBRS.xml | 57 +
src/cpu/cpu_map_x86_Haswell-noTSX-IBRS.xml | 55 +
src/cpu/cpu_map_x86_Haswell-noTSX.xml | 54 +
src/cpu/cpu_map_x86_Haswell.xml | 56 +
src/cpu/cpu_map_x86_IvyBridge-IBRS.xml | 51 +
src/cpu/cpu_map_x86_IvyBridge.xml | 50 +
src/cpu/cpu_map_x86_Nehalem-IBRS.xml | 38 +
src/cpu/cpu_map_x86_Nehalem.xml | 37 +
src/cpu/cpu_map_x86_Opteron_G1.xml | 31 +
src/cpu/cpu_map_x86_Opteron_G2.xml | 35 +
src/cpu/cpu_map_x86_Opteron_G3.xml | 40 +
src/cpu/cpu_map_x86_Opteron_G4.xml | 50 +
src/cpu/cpu_map_x86_Opteron_G5.xml | 53 +
src/cpu/cpu_map_x86_Penryn.xml | 35 +
src/cpu/cpu_map_x86_SandyBridge-IBRS.xml | 45 +
src/cpu/cpu_map_x86_SandyBridge.xml | 44 +
src/cpu/cpu_map_x86_Skylake-Client-IBRS.xml | 70 +
src/cpu/cpu_map_x86_Skylake-Client.xml | 69 +
src/cpu/cpu_map_x86_Skylake-Server-IBRS.xml | 77 +
src/cpu/cpu_map_x86_Skylake-Server.xml | 76 +
src/cpu/cpu_map_x86_Westmere-IBRS.xml | 39 +
src/cpu/cpu_map_x86_Westmere.xml | 38 +
src/cpu/cpu_map_x86_athlon.xml | 28 +
src/cpu/cpu_map_x86_core2duo.xml | 33 +
src/cpu/cpu_map_x86_coreduo.xml | 29 +
src/cpu/cpu_map_x86_cpu64-rhel5.xml | 29 +
src/cpu/cpu_map_x86_cpu64-rhel6.xml | 31 +
src/cpu/cpu_map_x86_features.xml | 440 ++++
src/cpu/cpu_map_x86_kvm32.xml | 26 +
src/cpu/cpu_map_x86_kvm64.xml | 30 +
src/cpu/cpu_map_x86_n270.xml | 30 +
src/cpu/cpu_map_x86_pentium.xml | 13 +
src/cpu/cpu_map_x86_pentium2.xml | 22 +
src/cpu/cpu_map_x86_pentium3.xml | 23 +
src/cpu/cpu_map_x86_pentiumpro.xml | 21 +
src/cpu/cpu_map_x86_phenom.xml | 36 +
src/cpu/cpu_map_x86_qemu32.xml | 22 +
src/cpu/cpu_map_x86_qemu64.xml | 40 +
src/cpu/cpu_map_x86_vendors.xml | 4 +
src/cpu/cpu_ppc64.c | 112 +-
src/cpu/cpu_x86.c | 196 +-
62 files changed, 2703 insertions(+), 2633 deletions(-)
create mode 100644 src/cpu/cpu_map_ppc64_POWER6.xml
create mode 100644 src/cpu/cpu_map_ppc64_POWER7.xml
create mode 100644 src/cpu/cpu_map_ppc64_POWER8.xml
create mode 100644 src/cpu/cpu_map_ppc64_POWER9.xml
create mode 100644 src/cpu/cpu_map_ppc64_POWERPC_e5500.xml
create mode 100644 src/cpu/cpu_map_ppc64_POWERPC_e6500.xml
create mode 100644 src/cpu/cpu_map_ppc64_vendors.xml
create mode 100644 src/cpu/cpu_map_x86_486.xml
create mode 100644 src/cpu/cpu_map_x86_Broadwell-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Broadwell-noTSX-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Broadwell-noTSX.xml
create mode 100644 src/cpu/cpu_map_x86_Broadwell.xml
create mode 100644 src/cpu/cpu_map_x86_Conroe.xml
create mode 100644 src/cpu/cpu_map_x86_EPYC-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_EPYC.xml
create mode 100644 src/cpu/cpu_map_x86_Haswell-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Haswell-noTSX-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Haswell-noTSX.xml
create mode 100644 src/cpu/cpu_map_x86_Haswell.xml
create mode 100644 src/cpu/cpu_map_x86_IvyBridge-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_IvyBridge.xml
create mode 100644 src/cpu/cpu_map_x86_Nehalem-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Nehalem.xml
create mode 100644 src/cpu/cpu_map_x86_Opteron_G1.xml
create mode 100644 src/cpu/cpu_map_x86_Opteron_G2.xml
create mode 100644 src/cpu/cpu_map_x86_Opteron_G3.xml
create mode 100644 src/cpu/cpu_map_x86_Opteron_G4.xml
create mode 100644 src/cpu/cpu_map_x86_Opteron_G5.xml
create mode 100644 src/cpu/cpu_map_x86_Penryn.xml
create mode 100644 src/cpu/cpu_map_x86_SandyBridge-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_SandyBridge.xml
create mode 100644 src/cpu/cpu_map_x86_Skylake-Client-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Skylake-Client.xml
create mode 100644 src/cpu/cpu_map_x86_Skylake-Server-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Skylake-Server.xml
create mode 100644 src/cpu/cpu_map_x86_Westmere-IBRS.xml
create mode 100644 src/cpu/cpu_map_x86_Westmere.xml
create mode 100644 src/cpu/cpu_map_x86_athlon.xml
create mode 100644 src/cpu/cpu_map_x86_core2duo.xml
create mode 100644 src/cpu/cpu_map_x86_coreduo.xml
create mode 100644 src/cpu/cpu_map_x86_cpu64-rhel5.xml
create mode 100644 src/cpu/cpu_map_x86_cpu64-rhel6.xml
create mode 100644 src/cpu/cpu_map_x86_features.xml
create mode 100644 src/cpu/cpu_map_x86_kvm32.xml
create mode 100644 src/cpu/cpu_map_x86_kvm64.xml
create mode 100644 src/cpu/cpu_map_x86_n270.xml
create mode 100644 src/cpu/cpu_map_x86_pentium.xml
create mode 100644 src/cpu/cpu_map_x86_pentium2.xml
create mode 100644 src/cpu/cpu_map_x86_pentium3.xml
create mode 100644 src/cpu/cpu_map_x86_pentiumpro.xml
create mode 100644 src/cpu/cpu_map_x86_phenom.xml
create mode 100644 src/cpu/cpu_map_x86_qemu32.xml
create mode 100644 src/cpu/cpu_map_x86_qemu64.xml
create mode 100644 src/cpu/cpu_map_x86_vendors.xml
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] spec: Add firmware/nvram paths for edk2 arm and ia32
by Cole Robinson
And clarify the comments to instead mention the package names
that provide these files
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
libvirt.spec.in | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 3edb60d2d2..f3d5c032af 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1132,14 +1132,22 @@ exit 1
%define arg_selinux_mount --with-selinux-mount="/sys/fs/selinux"
%if 0%{?fedora}
- # Nightly firmware repo x86/OVMF
+ # Nightly edk2.git-ovmf-x64
LOADERS="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd"
- # Nightly firmware repo aarch64/AAVMF
+ # Nightly edk2.git-ovmf-ia32
+ LOADERS="/usr/share/edk2.git/ovmf-ia32/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd"
+ # Nightly edk2.git-aarch64
LOADERS="$LOADERS:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
- # Fedora official x86/OVMF
+ # Nightly edk2.git-arm
+ LOADERS="$LOADERS:/usr/share/edk2.git/arm/QEMU_EFI-pflash.raw:/usr/share/edk2.git/arm/vars-template-pflash.raw"
+ # Fedora edk2-ovmf
LOADERS="$LOADERS:/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd"
- # Fedora official aarch64/AAVMF
+ # Fedora edk2-ovmf-ia32
+ LOADERS="$LOADERS:/usr/share/edk2/ovmf-ia32/OVMF_CODE.fd:/usr/share/edk2/ovmf-ia32/OVMF_VARS.fd"
+ # Fedora edk2-aarch64
LOADERS="$LOADERS:/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw"
+ # Fedora edk2-arm
+ LOADERS="$LOADERS:/usr/share/edk2/arm/QEMU_EFI-pflash.raw:/usr/share/edk2/arm/vars-template-pflash.raw"
%define arg_loader_nvram --with-loader-nvram="$LOADERS"
%endif
--
2.17.1
6 years, 4 months
[libvirt] Investigation and possible fix of 1361592 - apparmor profiles do not include backing files
by Povilas Kanapickas
Hi,
I've looked into why apparmor profiles do not contain exceptions for
backing files of images which later leads to permission errors due to
apparmor containment. As of newest libvirt git master, only the first
level backing image is included, the subsequent images are omitted.
Below is my investigation of why this issue happens. It is based on
libvirt git master as of 2018-08-15 (e3e48d7cb82d58). The possible fix
is easy, but I don't have the background how to write tests for it, so
it's best that someone who knows the project well completes the fix
In my case I have the following file hierarchy:
- image-master.qcow2 (has backing file image-backing-1.qcow2)
- image-backing-1.qcow2 (has backing file image-backing-2.qcow2
- image-backing-2.qcow2
The apparmor profiles are created by the virt-aa-helper tool. The
get_files function (src/security/virt-aa-helper.c:949) creates a list of
files that need to be accessed by the virtual machine. The call to
virDomainDiskDefForeachPath() is responsible for creating the list of
files required to access each disk given the disk metadata.
The disk->src argument contains the source file. The expected file
hierarchy would be this:
disk->src->path == path/to/image-master.qcow2
disk->src->backingStore->path == path/to/image-backing-1.qcow2
disk->src->backingStore->backingStore->path == path/to/image-backing-2.qcow2
Unfortunately only the first two levels are present and
disk->src->backingStore->backingStore points to a dummy object.
The backing store details are filled in virStorageFileGetMetadata()
call. It calls into virStorageFileGetMetadataRecurse
(src/util/virstoragefile.c:4789) which will collect metadata for a
single image and recurse into itself for backing files.
For us, the following part of virStorageFileGetMetadataRecurse is
important (simplified for brevity):
```
virStorageFileGetMetadataInternal(src, ..., &backingFormat);
if (src->backingStoreRaw) {
backingStore = ...
if (backingFormat == VIR_STORAGE_FILE_AUTO)
backingStore->format = VIR_STORAGE_FILE_RAW; [1]
else if (backingFormat == VIR_STORAGE_FILE_AUTO_SAFE)
backingStore->format = VIR_STORAGE_FILE_AUTO;
else
backingStore->format = backingFormat;
virStorageFileGetMetadataRecurse(backingStore, ...) [2]
}
```
The crux of the issue seems that the call to
virStorageFileGetMetadataInternal() for the image-master.qcow2 image
will set the `backingFormat` return value to
VIR_STORAGE_FILE_AUTO. The code responsible is in qcowXGetBackingStore
(src/util/virstoragefile.c:491) called via
`fileTypeInfo[meta->format].getBackingStore(...)` at
src/util/virstoragefile.c:1042.
It backingFormat is then downgraded to VIR_STORAGE_FILE_RAW at
src/util/virstoragefile.c:4854 ([1] above). This causes the next recurse
call to
virStorageFileGetMetadataRecurse() ([2] above) to not investigate the
backing images at all in virStorageFileGetMetadataInternal() as
fileTypeInfo[VIR_STORAGE_FILE_RAW].getBackingStore will be NULL.
The possible solution is to return VIR_STORAGE_FILE_AUTO_SAFE from
qcowXGetBackingStore. It probably does not make much sense to prevent
probing of qcow2 backing images as we probe the first level of backing
images anyway, so that return value only affect second and subsequent
levels of backing images. Looking into the implementation of
qcowXGetBackingStore it also does not seem that it performs any
operations that are unsafe by design.
Currently VIR_STORAGE_FILE_AUTO is used only in qedGetBackingStore and
it does not seem that probing of qcow images is unsafe enough
What do the developers think about this? Could someone complete the fix
with tests or advise me about the testing frameworks if there's not
enough time?
Thanks a lot!
Povilas
6 years, 4 months
[libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private
by Michal Privoznik
G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
This was generated mostly using:
sed -i "s/G_DEFINE_TYPE(/G_DEFINE_TYPE_WITH_PRIVATE(/
sed -i "/^\s\+g_type_class_add_private.*$/ d"
and then adding G_GNUC_UNUSED wherever compiler complained.
libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 3 +--
libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-guest.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities-host.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-capabilities.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-address-pci.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-address-usb.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-address.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-channel.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-chardev.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-clock.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-console.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-controller.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-cpu.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-device.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-disk.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-graphics.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-hostdev.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-input.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c | 5 ++---
.../libvirt-gconfig-domain-interface-filterref-parameter.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-interface-network.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-interface-user.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-interface.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-memballoon.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-os.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-parallel.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-power-management.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-redirdev.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-seclabel.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-serial.c | 5 ++---
.../libvirt-gconfig-domain-smartcard-host-certificates.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-smartcard.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-snapshot.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-sound.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-timer.c | 3 +--
libvirt-gconfig/libvirt-gconfig-domain-video.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain.c | 3 +--
libvirt-gconfig/libvirt-gconfig-interface.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-network-filter.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-network.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-node-device.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-object.c | 4 +---
libvirt-gconfig/libvirt-gconfig-secret.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-storage-permissions.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-storage-pool-source.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-storage-pool-target.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-storage-pool.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-storage-vol-target.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-storage-vol.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-xml-doc.c | 3 +--
libvirt-gobject/libvirt-gobject-connection.c | 3 +--
libvirt-gobject/libvirt-gobject-domain-device.c | 1 -
libvirt-gobject/libvirt-gobject-domain-disk.c | 5 ++---
libvirt-gobject/libvirt-gobject-domain-interface.c | 5 ++---
libvirt-gobject/libvirt-gobject-domain-snapshot.c | 3 +--
libvirt-gobject/libvirt-gobject-domain.c | 3 +--
libvirt-gobject/libvirt-gobject-input-stream.c | 7 +++----
libvirt-gobject/libvirt-gobject-interface.c | 3 +--
libvirt-gobject/libvirt-gobject-manager.c | 3 +--
libvirt-gobject/libvirt-gobject-network-dhcp-lease.c | 3 +--
libvirt-gobject/libvirt-gobject-network-filter.c | 3 +--
libvirt-gobject/libvirt-gobject-network.c | 3 +--
libvirt-gobject/libvirt-gobject-node-device.c | 3 +--
libvirt-gobject/libvirt-gobject-output-stream.c | 7 +++----
libvirt-gobject/libvirt-gobject-secret.c | 3 +--
libvirt-gobject/libvirt-gobject-storage-pool.c | 3 +--
libvirt-gobject/libvirt-gobject-storage-vol.c | 3 +--
libvirt-gobject/libvirt-gobject-stream.c | 3 +--
99 files changed, 171 insertions(+), 271 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c
index b52c0bf..3b0a47d 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesCpuFeaturePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpuFeature, gvir_config_capabilities_cpu_feature, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpuFeature, gvir_config_capabilities_cpu_feature, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_cpu_feature_class_init(GVirConfigCapabilitiesCpuFeatureClass *klass)
+static void gvir_config_capabilities_cpu_feature_class_init(GVirConfigCapabilitiesCpuFeatureClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuFeaturePrivate));
}
static void gvir_config_capabilities_cpu_feature_init(GVirConfigCapabilitiesCpuFeature *feature)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c
index 14630a0..21b6c18 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c
@@ -33,11 +33,10 @@ struct _GVirConfigCapabilitiesCpuModelPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpuModel, gvir_config_capabilities_cpu_model, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpuModel, gvir_config_capabilities_cpu_model, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_cpu_model_class_init(GVirConfigCapabilitiesCpuModelClass *klass)
+static void gvir_config_capabilities_cpu_model_class_init(GVirConfigCapabilitiesCpuModelClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuModelPrivate));
}
static void gvir_config_capabilities_cpu_model_init(GVirConfigCapabilitiesCpuModel *model)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
index 1ff879a..f4edc5c 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesCpuTopologyPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpuTopology, gvir_config_capabilities_cpu_topology, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpuTopology, gvir_config_capabilities_cpu_topology, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_cpu_topology_class_init(GVirConfigCapabilitiesCpuTopologyClass *klass)
+static void gvir_config_capabilities_cpu_topology_class_init(GVirConfigCapabilitiesCpuTopologyClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuTopologyPrivate));
}
static void gvir_config_capabilities_cpu_topology_init(GVirConfigCapabilitiesCpuTopology *topology)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
index 913c759..1056bbd 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
@@ -35,14 +35,13 @@ struct _GVirConfigCapabilitiesCpuPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpu, gvir_config_capabilities_cpu, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpu, gvir_config_capabilities_cpu, GVIR_CONFIG_TYPE_OBJECT);
static GList *
_gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu);
static void gvir_config_capabilities_cpu_class_init(GVirConfigCapabilitiesCpuClass *klass)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuPrivate));
klass->get_features = _gvir_config_capabilities_cpu_get_features;
}
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c
index 8da33dc..70c2885 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesGuestArchPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuestArch, gvir_config_capabilities_guest_arch, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuestArch, gvir_config_capabilities_guest_arch, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_guest_arch_class_init(GVirConfigCapabilitiesGuestArchClass *klass)
+static void gvir_config_capabilities_guest_arch_class_init(GVirConfigCapabilitiesGuestArchClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestArchPrivate));
}
static void gvir_config_capabilities_guest_arch_init(GVirConfigCapabilitiesGuestArch *arch)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c
index 3162ea1..5e438b1 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c
@@ -35,12 +35,11 @@ struct _GVirConfigCapabilitiesGuestDomainPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuestDomain, gvir_config_capabilities_guest_domain, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuestDomain, gvir_config_capabilities_guest_domain, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_guest_domain_class_init(GVirConfigCapabilitiesGuestDomainClass *klass)
+static void gvir_config_capabilities_guest_domain_class_init(GVirConfigCapabilitiesGuestDomainClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestDomainPrivate));
}
static void gvir_config_capabilities_guest_domain_init(GVirConfigCapabilitiesGuestDomain *domain)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c
index 9e9533a..036f38b 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesGuestFeaturePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuestFeature, gvir_config_capabilities_guest_feature, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuestFeature, gvir_config_capabilities_guest_feature, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_guest_feature_class_init(GVirConfigCapabilitiesGuestFeatureClass *klass)
+static void gvir_config_capabilities_guest_feature_class_init(GVirConfigCapabilitiesGuestFeatureClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestFeaturePrivate));
}
static void gvir_config_capabilities_guest_feature_init(GVirConfigCapabilitiesGuestFeature *feature)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c
index 128b22f..4d4e499 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c
@@ -35,12 +35,11 @@ struct _GVirConfigCapabilitiesGuestPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuest, gvir_config_capabilities_guest, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuest, gvir_config_capabilities_guest, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_guest_class_init(GVirConfigCapabilitiesGuestClass *klass)
+static void gvir_config_capabilities_guest_class_init(GVirConfigCapabilitiesGuestClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestPrivate));
}
static void gvir_config_capabilities_guest_init(GVirConfigCapabilitiesGuest *guest)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c b/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c
index 77e0593..2f76db2 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c
@@ -33,11 +33,10 @@ struct _GVirConfigCapabilitiesHostSecModelPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesHostSecModel, gvir_config_capabilities_host_secmodel, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesHostSecModel, gvir_config_capabilities_host_secmodel, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_host_secmodel_class_init(GVirConfigCapabilitiesHostSecModelClass *klass)
+static void gvir_config_capabilities_host_secmodel_class_init(GVirConfigCapabilitiesHostSecModelClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesHostSecModelPrivate));
}
static void gvir_config_capabilities_host_secmodel_init(GVirConfigCapabilitiesHostSecModel *secmodel)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-host.c b/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
index e26c2d0..30a574e 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
@@ -35,12 +35,11 @@ struct _GVirConfigCapabilitiesHostPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilitiesHost, gvir_config_capabilities_host, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesHost, gvir_config_capabilities_host, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_host_class_init(GVirConfigCapabilitiesHostClass *klass)
+static void gvir_config_capabilities_host_class_init(GVirConfigCapabilitiesHostClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesHostPrivate));
}
static void gvir_config_capabilities_host_init(GVirConfigCapabilitiesHost *host)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities.c b/libvirt-gconfig/libvirt-gconfig-capabilities.c
index 6cc5256..2b24696 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities.c
@@ -34,12 +34,11 @@ struct _GVirConfigCapabilitiesPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigCapabilities, gvir_config_capabilities, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilities, gvir_config_capabilities, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_capabilities_class_init(GVirConfigCapabilitiesClass *klass)
+static void gvir_config_capabilities_class_init(GVirConfigCapabilitiesClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c b/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c
index 0105402..6b19702 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainAddressPciPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainAddressPci, gvir_config_domain_address_pci, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainAddressPci, gvir_config_domain_address_pci, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
-static void gvir_config_domain_address_pci_class_init(GVirConfigDomainAddressPciClass *klass)
+static void gvir_config_domain_address_pci_class_init(GVirConfigDomainAddressPciClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainAddressPciPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c b/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c
index a794922..8f31757 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainAddressUsbPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainAddressUsb, gvir_config_domain_address_usb, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainAddressUsb, gvir_config_domain_address_usb, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
-static void gvir_config_domain_address_usb_class_init(GVirConfigDomainAddressUsbClass *klass)
+static void gvir_config_domain_address_usb_class_init(GVirConfigDomainAddressUsbClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainAddressUsbPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-address.c b/libvirt-gconfig/libvirt-gconfig-domain-address.c
index c0f6ba6..b070a1f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-address.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-address.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainAddressPrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainAddress, gvir_config_domain_address, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_address_class_init(GVirConfigDomainAddressClass *klass)
+static void gvir_config_domain_address_class_init(GVirConfigDomainAddressClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainAddressPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-channel.c b/libvirt-gconfig/libvirt-gconfig-domain-channel.c
index 20e79e3..3e820dd 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-channel.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-channel.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainChannelPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainChannel, gvir_config_domain_channel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChannel, gvir_config_domain_channel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
-static void gvir_config_domain_channel_class_init(GVirConfigDomainChannelClass *klass)
+static void gvir_config_domain_channel_class_init(GVirConfigDomainChannelClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainChannelPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
index c9fadc8..4ccd430 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainChardevSourcePtyPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainChardevSourcePty, gvir_config_domain_chardev_source_pty, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourcePty, gvir_config_domain_chardev_source_pty, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
-static void gvir_config_domain_chardev_source_pty_class_init(GVirConfigDomainChardevSourcePtyClass *klass)
+static void gvir_config_domain_chardev_source_pty_class_init(GVirConfigDomainChardevSourcePtyClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourcePtyPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
index 98ff221..7f98578 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
@@ -31,12 +31,11 @@ struct _GVirConfigDomainChardevSourceSpicePortPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainChardevSourceSpicePort, gvir_config_domain_chardev_source_spiceport, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourceSpicePort, gvir_config_domain_chardev_source_spiceport, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
-static void gvir_config_domain_chardev_source_spiceport_class_init(GVirConfigDomainChardevSourceSpicePortClass *klass)
+static void gvir_config_domain_chardev_source_spiceport_class_init(GVirConfigDomainChardevSourceSpicePortClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceSpicePortPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c
index d0b876b..2f63acb 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainChardevSourceSpiceVmcPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainChardevSourceSpiceVmc, gvir_config_domain_chardev_source_spicevmc, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourceSpiceVmc, gvir_config_domain_chardev_source_spicevmc, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
-static void gvir_config_domain_chardev_source_spicevmc_class_init(GVirConfigDomainChardevSourceSpiceVmcClass *klass)
+static void gvir_config_domain_chardev_source_spicevmc_class_init(GVirConfigDomainChardevSourceSpiceVmcClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceSpiceVmcPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c
index 069340f..854d413 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainChardevSourceUnixPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainChardevSourceUnix, gvir_config_domain_chardev_source_unix, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourceUnix, gvir_config_domain_chardev_source_unix, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
-static void gvir_config_domain_chardev_source_unix_class_init(GVirConfigDomainChardevSourceUnixClass *klass)
+static void gvir_config_domain_chardev_source_unix_class_init(GVirConfigDomainChardevSourceUnixClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceUnixPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c
index 117dbe1..50d4030 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c
@@ -37,9 +37,8 @@ struct _GVirConfigDomainChardevSourcePrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainChardevSource, gvir_config_domain_chardev_source, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_chardev_source_class_init(GVirConfigDomainChardevSourceClass *klass)
+static void gvir_config_domain_chardev_source_class_init(GVirConfigDomainChardevSourceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourcePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev.c
index fd5e4c9..a5ebc9c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainChardevPrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainChardev, gvir_config_domain_chardev, GVIR_CONFIG_TYPE_DOMAIN_DEVICE)
-static void gvir_config_domain_chardev_class_init(GVirConfigDomainChardevClass *klass)
+static void gvir_config_domain_chardev_class_init(GVirConfigDomainChardevClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-clock.c b/libvirt-gconfig/libvirt-gconfig-domain-clock.c
index 9795565..ae33623 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-clock.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-clock.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainClockPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainClock, gvir_config_domain_clock, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainClock, gvir_config_domain_clock, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_clock_class_init(GVirConfigDomainClockClass *klass)
+static void gvir_config_domain_clock_class_init(GVirConfigDomainClockClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainClockPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-console.c b/libvirt-gconfig/libvirt-gconfig-domain-console.c
index 5192870..ae75e11 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-console.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-console.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainConsolePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainConsole, gvir_config_domain_console, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainConsole, gvir_config_domain_console, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
-static void gvir_config_domain_console_class_init(GVirConfigDomainConsoleClass *klass)
+static void gvir_config_domain_console_class_init(GVirConfigDomainConsoleClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainConsolePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
index 4262465..a15db27 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
@@ -111,12 +111,11 @@ struct _GVirConfigDomainControllerUsbPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainControllerUsb, gvir_config_domain_controller_usb, GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainControllerUsb, gvir_config_domain_controller_usb, GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER);
-static void gvir_config_domain_controller_usb_class_init(GVirConfigDomainControllerUsbClass *klass)
+static void gvir_config_domain_controller_usb_class_init(GVirConfigDomainControllerUsbClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainControllerUsbPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller.c b/libvirt-gconfig/libvirt-gconfig-domain-controller.c
index 82994fe..a2d40c3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-controller.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainControllerPrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainController, gvir_config_domain_controller, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_controller_class_init(GVirConfigDomainControllerClass *klass)
+static void gvir_config_domain_controller_class_init(GVirConfigDomainControllerClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainControllerPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c b/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c
index dc5fa4e..61f0465 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c
@@ -35,11 +35,10 @@ struct _GVirConfigDomainCpuFeaturePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainCpuFeature, gvir_config_domain_cpu_feature, GVIR_CONFIG_TYPE_CAPABILITIES_CPU_FEATURE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainCpuFeature, gvir_config_domain_cpu_feature, GVIR_CONFIG_TYPE_CAPABILITIES_CPU_FEATURE);
-static void gvir_config_domain_cpu_feature_class_init(GVirConfigDomainCpuFeatureClass *klass)
+static void gvir_config_domain_cpu_feature_class_init(GVirConfigDomainCpuFeatureClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainCpuFeaturePrivate));
}
static void gvir_config_domain_cpu_feature_init(GVirConfigDomainCpuFeature *feature)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c b/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c
index 06a3ec8..6478427 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c
@@ -33,13 +33,12 @@ struct _GVirConfigDomainCpuModelPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainCpuModel,
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainCpuModel,
gvir_config_domain_cpu_model,
GVIR_CONFIG_TYPE_CAPABILITIES_CPU_MODEL);
-static void gvir_config_domain_cpu_model_class_init(GVirConfigDomainCpuModelClass *klass)
+static void gvir_config_domain_cpu_model_class_init(GVirConfigDomainCpuModelClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainCpuModelPrivate));
}
static void gvir_config_domain_cpu_model_init(GVirConfigDomainCpuModel *model)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-cpu.c b/libvirt-gconfig/libvirt-gconfig-domain-cpu.c
index 2dffae3..55a2704 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-cpu.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-cpu.c
@@ -35,7 +35,7 @@ struct _GVirConfigDomainCpuPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainCpu, gvir_config_domain_cpu, GVIR_CONFIG_TYPE_CAPABILITIES_CPU);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainCpu, gvir_config_domain_cpu, GVIR_CONFIG_TYPE_CAPABILITIES_CPU);
static GList *
_gvir_config_domain_cpu_get_features(GVirConfigCapabilitiesCpu *cpu);
@@ -47,7 +47,6 @@ static void gvir_config_domain_cpu_class_init(GVirConfigDomainCpuClass *klass)
capabilities_class = GVIR_CONFIG_CAPABILITIES_CPU_CLASS(klass);
capabilities_class->get_features = _gvir_config_domain_cpu_get_features;
- g_type_class_add_private(klass, sizeof(GVirConfigDomainCpuPrivate));
}
static void gvir_config_domain_cpu_init(GVirConfigDomainCpu *cpu)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-device.c b/libvirt-gconfig/libvirt-gconfig-domain-device.c
index 2475519..b585b39 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-device.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-device.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainDevicePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainDevice, gvir_config_domain_device, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainDevice, gvir_config_domain_device, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_device_class_init(GVirConfigDomainDeviceClass *klass)
+static void gvir_config_domain_device_class_init(GVirConfigDomainDeviceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainDevicePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c b/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c
index fb05e18..464fb1a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainDiskDriverPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainDiskDriver, gvir_config_domain_disk_driver, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainDiskDriver, gvir_config_domain_disk_driver, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_disk_driver_class_init(GVirConfigDomainDiskDriverClass *klass)
+static void gvir_config_domain_disk_driver_class_init(GVirConfigDomainDiskDriverClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainDiskDriverPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk.c b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
index 75aaa12..d97a285 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-disk.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainDiskPrivate
GVirConfigDomainDiskType type;
};
-G_DEFINE_TYPE(GVirConfigDomainDisk, gvir_config_domain_disk, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainDisk, gvir_config_domain_disk, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_disk_class_init(GVirConfigDomainDiskClass *klass)
+static void gvir_config_domain_disk_class_init(GVirConfigDomainDiskClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainDiskPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c b/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
index 56c3a01..9a029e4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainFilesysPrivate
GVirConfigDomainFilesysType type;
};
-G_DEFINE_TYPE(GVirConfigDomainFilesys, gvir_config_domain_filesys, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainFilesys, gvir_config_domain_filesys, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_filesys_class_init(GVirConfigDomainFilesysClass *klass)
+static void gvir_config_domain_filesys_class_init(GVirConfigDomainFilesysClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainFilesysPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c
index dadf684..2ae984f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsDesktopPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainGraphicsDesktop, gvir_config_domain_graphics_desktop, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsDesktop, gvir_config_domain_graphics_desktop, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
-static void gvir_config_domain_graphics_desktop_class_init(GVirConfigDomainGraphicsDesktopClass *klass)
+static void gvir_config_domain_graphics_desktop_class_init(GVirConfigDomainGraphicsDesktopClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsDesktopPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
index 7a2cb4d..4f7ef0f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsRdpPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainGraphicsRdp, gvir_config_domain_graphics_rdp, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsRdp, gvir_config_domain_graphics_rdp, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
-static void gvir_config_domain_graphics_rdp_class_init(GVirConfigDomainGraphicsRdpClass *klass)
+static void gvir_config_domain_graphics_rdp_class_init(GVirConfigDomainGraphicsRdpClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsRdpPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
index 1740494..cbf8410 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsSdlPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainGraphicsSdl, gvir_config_domain_graphics_sdl, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsSdl, gvir_config_domain_graphics_sdl, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
-static void gvir_config_domain_graphics_sdl_class_init(GVirConfigDomainGraphicsSdlClass *klass)
+static void gvir_config_domain_graphics_sdl_class_init(GVirConfigDomainGraphicsSdlClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsSdlPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index 079ea27..9e3570e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainGraphicsSpicePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainGraphicsSpice, gvir_config_domain_graphics_spice, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsSpice, gvir_config_domain_graphics_spice, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
-static void gvir_config_domain_graphics_spice_class_init(GVirConfigDomainGraphicsSpiceClass *klass)
+static void gvir_config_domain_graphics_spice_class_init(GVirConfigDomainGraphicsSpiceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsSpicePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index fc26bb9..4c78b11 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsVncPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainGraphicsVnc, gvir_config_domain_graphics_vnc, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsVnc, gvir_config_domain_graphics_vnc, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
-static void gvir_config_domain_graphics_vnc_class_init(GVirConfigDomainGraphicsVncClass *klass)
+static void gvir_config_domain_graphics_vnc_class_init(GVirConfigDomainGraphicsVncClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsVncPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
index 8b06e95..e35976f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainGraphicsPrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainGraphics, gvir_config_domain_graphics, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_graphics_class_init(GVirConfigDomainGraphicsClass *klass)
+static void gvir_config_domain_graphics_class_init(GVirConfigDomainGraphicsClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c b/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c
index c789c9c..36841e5 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c
@@ -34,11 +34,10 @@ struct _GVirConfigDomainHostdevPciPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainHostdevPci, gvir_config_domain_hostdev_pci, GVIR_CONFIG_TYPE_DOMAIN_HOSTDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainHostdevPci, gvir_config_domain_hostdev_pci, GVIR_CONFIG_TYPE_DOMAIN_HOSTDEV);
-static void gvir_config_domain_hostdev_pci_class_init(GVirConfigDomainHostdevPciClass *klass)
+static void gvir_config_domain_hostdev_pci_class_init(GVirConfigDomainHostdevPciClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainHostdevPciPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c b/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c
index 459674d..ade2dc3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c
@@ -37,9 +37,8 @@ struct _GVirConfigDomainHostdevPrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainHostdev, gvir_config_domain_hostdev, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_hostdev_class_init(GVirConfigDomainHostdevClass *klass)
+static void gvir_config_domain_hostdev_class_init(GVirConfigDomainHostdevClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainHostdevPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-input.c b/libvirt-gconfig/libvirt-gconfig-domain-input.c
index 7734c61..9d7de77 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-input.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-input.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainInputPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainInput, gvir_config_domain_input, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInput, gvir_config_domain_input, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_input_class_init(GVirConfigDomainInputClass *klass)
+static void gvir_config_domain_input_class_init(GVirConfigDomainInputClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainInputPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c
index a10b3c1..33ba27b 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c
@@ -36,12 +36,11 @@ struct _GVirConfigDomainInterfaceBridgePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainInterfaceBridge, gvir_config_domain_interface_bridge, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceBridge, gvir_config_domain_interface_bridge, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
-static void gvir_config_domain_interface_bridge_class_init(GVirConfigDomainInterfaceBridgeClass *klass)
+static void gvir_config_domain_interface_bridge_class_init(GVirConfigDomainInterfaceBridgeClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceBridgePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c
index abca213..e166482 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c
@@ -35,11 +35,10 @@ struct _GVirConfigDomainInterfaceFilterrefParameterPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainInterfaceFilterrefParameter, gvir_config_domain_interface_filterref_parameter, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceFilterrefParameter, gvir_config_domain_interface_filterref_parameter, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_interface_filterref_parameter_class_init(GVirConfigDomainInterfaceFilterrefParameterClass *klass)
+static void gvir_config_domain_interface_filterref_parameter_class_init(GVirConfigDomainInterfaceFilterrefParameterClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceFilterrefParameterPrivate));
}
static void gvir_config_domain_interface_filterref_parameter_init(GVirConfigDomainInterfaceFilterrefParameter *parameter)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c
index 132d9f5..a73b6a8 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c
@@ -34,11 +34,10 @@ struct _GVirConfigDomainInterfaceFilterrefPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainInterfaceFilterref, gvir_config_domain_interface_filterref, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceFilterref, gvir_config_domain_interface_filterref, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_interface_filterref_class_init(GVirConfigDomainInterfaceFilterrefClass *klass)
+static void gvir_config_domain_interface_filterref_class_init(GVirConfigDomainInterfaceFilterrefClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceFilterrefPrivate));
}
static void gvir_config_domain_interface_filterref_init(GVirConfigDomainInterfaceFilterref *filterref)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
index 27ad6ed..7083ad1 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
@@ -35,12 +35,11 @@ struct _GVirConfigDomainInterfaceNetworkPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainInterfaceNetwork, gvir_config_domain_interface_network, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceNetwork, gvir_config_domain_interface_network, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
-static void gvir_config_domain_interface_network_class_init(GVirConfigDomainInterfaceNetworkClass *klass)
+static void gvir_config_domain_interface_network_class_init(GVirConfigDomainInterfaceNetworkClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceNetworkPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c
index d5672d6..514d49c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c
@@ -35,12 +35,11 @@ struct _GVirConfigDomainInterfaceUserPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainInterfaceUser, gvir_config_domain_interface_user, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceUser, gvir_config_domain_interface_user, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
-static void gvir_config_domain_interface_user_class_init(GVirConfigDomainInterfaceUserClass *klass)
+static void gvir_config_domain_interface_user_class_init(GVirConfigDomainInterfaceUserClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceUserPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface.c b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
index c5b57bd..2b841b3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
@@ -38,9 +38,8 @@ struct _GVirConfigDomainInterfacePrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainInterface, gvir_config_domain_interface, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_interface_class_init(GVirConfigDomainInterfaceClass *klass)
+static void gvir_config_domain_interface_class_init(GVirConfigDomainInterfaceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfacePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c b/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c
index c5d7768..509064e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainMemballoonPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainMemballoon, gvir_config_domain_memballoon, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainMemballoon, gvir_config_domain_memballoon, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_memballoon_class_init(GVirConfigDomainMemballoonClass *klass)
+static void gvir_config_domain_memballoon_class_init(GVirConfigDomainMemballoonClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainMemballoonPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.c b/libvirt-gconfig/libvirt-gconfig-domain-os.c
index 9a00ef4..f12e1e7 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-os.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-os.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainOsPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainOs, gvir_config_domain_os, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainOs, gvir_config_domain_os, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_os_class_init(GVirConfigDomainOsClass *klass)
+static void gvir_config_domain_os_class_init(GVirConfigDomainOsClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainOsPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-parallel.c b/libvirt-gconfig/libvirt-gconfig-domain-parallel.c
index f48d1b6..d523f06 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-parallel.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-parallel.c
@@ -32,12 +32,11 @@ struct _GVirConfigDomainParallelPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainParallel, gvir_config_domain_parallel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainParallel, gvir_config_domain_parallel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
-static void gvir_config_domain_parallel_class_init(GVirConfigDomainParallelClass *klass)
+static void gvir_config_domain_parallel_class_init(GVirConfigDomainParallelClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainParallelPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-power-management.c b/libvirt-gconfig/libvirt-gconfig-domain-power-management.c
index c070a0f..7488e7a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-power-management.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-power-management.c
@@ -38,14 +38,13 @@ struct _GVirConfigDomainPowerManagementPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainPowerManagement,
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainPowerManagement,
gvir_config_domain_power_management,
GVIR_CONFIG_TYPE_OBJECT);
static void gvir_config_domain_power_management_class_init
- (GVirConfigDomainPowerManagementClass *klass)
+ (GVirConfigDomainPowerManagementClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainPowerManagementPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c b/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c
index 5fd4dda..1d1b321 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainRedirdevPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainRedirdev, gvir_config_domain_redirdev, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainRedirdev, gvir_config_domain_redirdev, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
-static void gvir_config_domain_redirdev_class_init(GVirConfigDomainRedirdevClass *klass)
+static void gvir_config_domain_redirdev_class_init(GVirConfigDomainRedirdevClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainRedirdevPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c b/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c
index 77d8aa0..acb8fa2 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSeclabelPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSeclabel, gvir_config_domain_seclabel, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSeclabel, gvir_config_domain_seclabel, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_seclabel_class_init(GVirConfigDomainSeclabelClass *klass)
+static void gvir_config_domain_seclabel_class_init(GVirConfigDomainSeclabelClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSeclabelPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-serial.c b/libvirt-gconfig/libvirt-gconfig-domain-serial.c
index 84adb2a..2523f4a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-serial.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-serial.c
@@ -32,12 +32,11 @@ struct _GVirConfigDomainSerialPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSerial, gvir_config_domain_serial, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSerial, gvir_config_domain_serial, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
-static void gvir_config_domain_serial_class_init(GVirConfigDomainSerialClass *klass)
+static void gvir_config_domain_serial_class_init(GVirConfigDomainSerialClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSerialPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c
index ab5abc4..be90d3a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSmartcardHostCertificatesPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSmartcardHostCertificates, gvir_config_domain_smartcard_host_certificates, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSmartcardHostCertificates, gvir_config_domain_smartcard_host_certificates, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
-static void gvir_config_domain_smartcard_host_certificates_class_init(GVirConfigDomainSmartcardHostCertificatesClass *klass)
+static void gvir_config_domain_smartcard_host_certificates_class_init(GVirConfigDomainSmartcardHostCertificatesClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardHostCertificatesPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c
index b29e07b..4ef8b90 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSmartcardHostPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSmartcardHost, gvir_config_domain_smartcard_host, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSmartcardHost, gvir_config_domain_smartcard_host, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
-static void gvir_config_domain_smartcard_host_class_init(GVirConfigDomainSmartcardHostClass *klass)
+static void gvir_config_domain_smartcard_host_class_init(GVirConfigDomainSmartcardHostClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardHostPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c
index 830faa4..2d2fb97 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSmartcardPassthroughPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSmartcardPassthrough, gvir_config_domain_smartcard_passthrough, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSmartcardPassthrough, gvir_config_domain_smartcard_passthrough, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
-static void gvir_config_domain_smartcard_passthrough_class_init(GVirConfigDomainSmartcardPassthroughClass *klass)
+static void gvir_config_domain_smartcard_passthrough_class_init(GVirConfigDomainSmartcardPassthroughClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardPassthroughPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c
index 7900c1a..f7c65f0 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainSmartcardPrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainSmartcard, gvir_config_domain_smartcard, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_smartcard_class_init(GVirConfigDomainSmartcardClass *klass)
+static void gvir_config_domain_smartcard_class_init(GVirConfigDomainSmartcardClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c b/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c
index ba7a40e..041f6db 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainSnapshotDiskPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSnapshotDisk, gvir_config_domain_snapshot_disk, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSnapshotDisk, gvir_config_domain_snapshot_disk, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_snapshot_disk_class_init(GVirConfigDomainSnapshotDiskClass *klass)
+static void gvir_config_domain_snapshot_disk_class_init(GVirConfigDomainSnapshotDiskClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSnapshotDiskPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
index 69b7df7..ae79932 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
@@ -35,12 +35,11 @@ struct _GVirConfigDomainSnapshotPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSnapshot, gvir_config_domain_snapshot, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSnapshot, gvir_config_domain_snapshot, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_snapshot_class_init(GVirConfigDomainSnapshotClass *klass)
+static void gvir_config_domain_snapshot_class_init(GVirConfigDomainSnapshotClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSnapshotPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-sound.c b/libvirt-gconfig/libvirt-gconfig-domain-sound.c
index 7ce71bd..937143c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-sound.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-sound.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSoundPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainSound, gvir_config_domain_sound, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSound, gvir_config_domain_sound, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_sound_class_init(GVirConfigDomainSoundClass *klass)
+static void gvir_config_domain_sound_class_init(GVirConfigDomainSoundClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainSoundPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c b/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c
index ba74a28..ba24cb9 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainTimerHpetPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainTimerHpet, gvir_config_domain_timer_hpet, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainTimerHpet, gvir_config_domain_timer_hpet, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
-static void gvir_config_domain_timer_hpet_class_init(GVirConfigDomainTimerHpetClass *klass)
+static void gvir_config_domain_timer_hpet_class_init(GVirConfigDomainTimerHpetClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerHpetPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c b/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c
index af979b2..1bc13b4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainTimerPitPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainTimerPit, gvir_config_domain_timer_pit, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainTimerPit, gvir_config_domain_timer_pit, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
-static void gvir_config_domain_timer_pit_class_init(GVirConfigDomainTimerPitClass *klass)
+static void gvir_config_domain_timer_pit_class_init(GVirConfigDomainTimerPitClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerPitPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c b/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c
index 0adcc66..06a76c8 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainTimerRtcPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainTimerRtc, gvir_config_domain_timer_rtc, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainTimerRtc, gvir_config_domain_timer_rtc, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
-static void gvir_config_domain_timer_rtc_class_init(GVirConfigDomainTimerRtcClass *klass)
+static void gvir_config_domain_timer_rtc_class_init(GVirConfigDomainTimerRtcClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerRtcPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer.c b/libvirt-gconfig/libvirt-gconfig-domain-timer.c
index e89e111..f33a56f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainTimerPrivate
G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainTimer, gvir_config_domain_timer, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_domain_timer_class_init(GVirConfigDomainTimerClass *klass)
+static void gvir_config_domain_timer_class_init(GVirConfigDomainTimerClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.c b/libvirt-gconfig/libvirt-gconfig-domain-video.c
index ed11476..3a98cf0 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-video.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-video.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainVideoPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainVideo, gvir_config_domain_video, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainVideo, gvir_config_domain_video, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
-static void gvir_config_domain_video_class_init(GVirConfigDomainVideoClass *klass)
+static void gvir_config_domain_video_class_init(GVirConfigDomainVideoClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigDomainVideoPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c
index de84fd4..82f8516 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -34,7 +34,7 @@ struct _GVirConfigDomainPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomain, gvir_config_domain, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomain, gvir_config_domain, GVIR_CONFIG_TYPE_OBJECT);
enum {
PROP_0,
@@ -128,7 +128,6 @@ static void gvir_config_domain_class_init(GVirConfigDomainClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
- g_type_class_add_private(klass, sizeof(GVirConfigDomainPrivate));
object_class->get_property = gvir_config_domain_get_property;
object_class->set_property = gvir_config_domain_set_property;
diff --git a/libvirt-gconfig/libvirt-gconfig-interface.c b/libvirt-gconfig/libvirt-gconfig-interface.c
index 6c81325..dbf261a 100644
--- a/libvirt-gconfig/libvirt-gconfig-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-interface.c
@@ -33,12 +33,11 @@ struct _GVirConfigInterfacePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigInterface, gvir_config_interface, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigInterface, gvir_config_interface, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_interface_class_init(GVirConfigInterfaceClass *klass)
+static void gvir_config_interface_class_init(GVirConfigInterfaceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigInterfacePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-network-filter.c b/libvirt-gconfig/libvirt-gconfig-network-filter.c
index eddf05c..b1b1476 100644
--- a/libvirt-gconfig/libvirt-gconfig-network-filter.c
+++ b/libvirt-gconfig/libvirt-gconfig-network-filter.c
@@ -33,12 +33,11 @@ struct _GVirConfigNetworkFilterPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigNetworkFilter, gvir_config_network_filter, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigNetworkFilter, gvir_config_network_filter, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_network_filter_class_init(GVirConfigNetworkFilterClass *klass)
+static void gvir_config_network_filter_class_init(GVirConfigNetworkFilterClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigNetworkFilterPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-network.c b/libvirt-gconfig/libvirt-gconfig-network.c
index 963d056..14e76bb 100644
--- a/libvirt-gconfig/libvirt-gconfig-network.c
+++ b/libvirt-gconfig/libvirt-gconfig-network.c
@@ -33,12 +33,11 @@ struct _GVirConfigNetworkPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigNetwork, gvir_config_network, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigNetwork, gvir_config_network, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_network_class_init(GVirConfigNetworkClass *klass)
+static void gvir_config_network_class_init(GVirConfigNetworkClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigNetworkPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-node-device.c b/libvirt-gconfig/libvirt-gconfig-node-device.c
index b89690f..40bd415 100644
--- a/libvirt-gconfig/libvirt-gconfig-node-device.c
+++ b/libvirt-gconfig/libvirt-gconfig-node-device.c
@@ -33,12 +33,11 @@ struct _GVirConfigNodeDevicePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigNodeDevice, gvir_config_node_device, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigNodeDevice, gvir_config_node_device, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_node_device_class_init(GVirConfigNodeDeviceClass *klass)
+static void gvir_config_node_device_class_init(GVirConfigNodeDeviceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigNodeDevicePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/libvirt-gconfig-object.c
index ca2c6e6..fffbd21 100644
--- a/libvirt-gconfig/libvirt-gconfig-object.c
+++ b/libvirt-gconfig/libvirt-gconfig-object.c
@@ -42,7 +42,7 @@ struct _GVirConfigObjectPrivate
xmlNodePtr node;
};
-G_DEFINE_TYPE(GVirConfigObject, gvir_config_object, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigObject, gvir_config_object, G_TYPE_OBJECT);
enum {
PROP_0,
@@ -175,8 +175,6 @@ static void gvir_config_object_class_init(GVirConfigObjectClass *klass)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
-
- g_type_class_add_private(klass, sizeof(GVirConfigObjectPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-secret.c b/libvirt-gconfig/libvirt-gconfig-secret.c
index 73a3fc3..5bdb53a 100644
--- a/libvirt-gconfig/libvirt-gconfig-secret.c
+++ b/libvirt-gconfig/libvirt-gconfig-secret.c
@@ -33,12 +33,11 @@ struct _GVirConfigSecretPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigSecret, gvir_config_secret, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigSecret, gvir_config_secret, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_secret_class_init(GVirConfigSecretClass *klass)
+static void gvir_config_secret_class_init(GVirConfigSecretClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigSecretPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-permissions.c b/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
index 79c3b9e..886c6de 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
@@ -33,12 +33,11 @@ struct _GVirConfigStoragePermissionsPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigStoragePermissions, gvir_config_storage_permissions, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePermissions, gvir_config_storage_permissions, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_storage_permissions_class_init(GVirConfigStoragePermissionsClass *klass)
+static void gvir_config_storage_permissions_class_init(GVirConfigStoragePermissionsClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigStoragePermissionsPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
index 07af50b..987b97d 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
@@ -34,12 +34,11 @@ struct _GVirConfigStoragePoolSourcePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigStoragePoolSource, gvir_config_storage_pool_source, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePoolSource, gvir_config_storage_pool_source, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_storage_pool_source_class_init(GVirConfigStoragePoolSourceClass *klass)
+static void gvir_config_storage_pool_source_class_init(GVirConfigStoragePoolSourceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolSourcePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
index 72ea21d..a686479 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
@@ -34,12 +34,11 @@ struct _GVirConfigStoragePoolTargetPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigStoragePoolTarget, gvir_config_storage_pool_target, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePoolTarget, gvir_config_storage_pool_target, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_storage_pool_target_class_init(GVirConfigStoragePoolTargetClass *klass)
+static void gvir_config_storage_pool_target_class_init(GVirConfigStoragePoolTargetClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolTargetPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool.c b/libvirt-gconfig/libvirt-gconfig-storage-pool.c
index 0c7940d..72cfa28 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool.c
@@ -35,12 +35,11 @@ struct _GVirConfigStoragePoolPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigStoragePool, gvir_config_storage_pool, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePool, gvir_config_storage_pool, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_storage_pool_class_init(GVirConfigStoragePoolClass *klass)
+static void gvir_config_storage_pool_class_init(GVirConfigStoragePoolClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
index 14a0e22..b574af0 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
@@ -34,12 +34,11 @@ struct _GVirConfigStorageVolBackingStorePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigStorageVolBackingStore, gvir_config_storage_vol_backing_store, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStorageVolBackingStore, gvir_config_storage_vol_backing_store, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_storage_vol_backing_store_class_init(GVirConfigStorageVolBackingStoreClass *klass)
+static void gvir_config_storage_vol_backing_store_class_init(GVirConfigStorageVolBackingStoreClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigStorageVolBackingStorePrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
index cf4c0c7..751c950 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
@@ -34,12 +34,11 @@ struct _GVirConfigStorageVolTargetPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigStorageVolTarget, gvir_config_storage_vol_target, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStorageVolTarget, gvir_config_storage_vol_target, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_storage_vol_target_class_init(GVirConfigStorageVolTargetClass *klass)
+static void gvir_config_storage_vol_target_class_init(GVirConfigStorageVolTargetClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigStorageVolTargetPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol.c b/libvirt-gconfig/libvirt-gconfig-storage-vol.c
index 2dade7e..76ac105 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol.c
@@ -35,12 +35,11 @@ struct _GVirConfigStorageVolPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigStorageVol, gvir_config_storage_vol, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStorageVol, gvir_config_storage_vol, GVIR_CONFIG_TYPE_OBJECT);
-static void gvir_config_storage_vol_class_init(GVirConfigStorageVolClass *klass)
+static void gvir_config_storage_vol_class_init(GVirConfigStorageVolClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirConfigStorageVolPrivate));
}
diff --git a/libvirt-gconfig/libvirt-gconfig-xml-doc.c b/libvirt-gconfig/libvirt-gconfig-xml-doc.c
index d17da21..fd461d7 100644
--- a/libvirt-gconfig/libvirt-gconfig-xml-doc.c
+++ b/libvirt-gconfig/libvirt-gconfig-xml-doc.c
@@ -37,7 +37,7 @@ struct _GVirConfigXmlDocPrivate
xmlDocPtr doc;
};
-G_DEFINE_TYPE(GVirConfigXmlDoc, gvir_config_xml_doc, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigXmlDoc, gvir_config_xml_doc, G_TYPE_OBJECT);
enum {
PROP_0,
@@ -90,7 +90,6 @@ static void gvir_config_xml_doc_class_init(GVirConfigXmlDocClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
- g_type_class_add_private(klass, sizeof(GVirConfigXmlDocPrivate));
object_class->finalize = gvir_config_xml_doc_finalize;
object_class->get_property = gvir_config_xml_doc_get_property;
diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
index 3f17265..b8f88b3 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -48,7 +48,7 @@ struct _GVirConnectionPrivate
GHashTable *networks;
};
-G_DEFINE_TYPE(GVirConnection, gvir_connection, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConnection, gvir_connection, G_TYPE_OBJECT);
enum {
@@ -231,7 +231,6 @@ static void gvir_connection_class_init(GVirConnectionClass *klass)
1,
GVIR_TYPE_DOMAIN);
- g_type_class_add_private(klass, sizeof(GVirConnectionPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-domain-device.c b/libvirt-gobject/libvirt-gobject-domain-device.c
index 8986e44..c113941 100644
--- a/libvirt-gobject/libvirt-gobject-domain-device.c
+++ b/libvirt-gobject/libvirt-gobject-domain-device.c
@@ -135,7 +135,6 @@ static void gvir_domain_device_class_init(GVirDomainDeviceClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirDomainDevicePrivate));
}
static void gvir_domain_device_init(GVirDomainDevice *self)
diff --git a/libvirt-gobject/libvirt-gobject-domain-disk.c b/libvirt-gobject/libvirt-gobject-domain-disk.c
index bb2a682..f0cb848 100644
--- a/libvirt-gobject/libvirt-gobject-domain-disk.c
+++ b/libvirt-gobject/libvirt-gobject-domain-disk.c
@@ -39,7 +39,7 @@ struct _GVirDomainDiskPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirDomainDisk, gvir_domain_disk, GVIR_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomainDisk, gvir_domain_disk, GVIR_TYPE_DOMAIN_DEVICE);
#define GVIR_DOMAIN_DISK_ERROR gvir_domain_disk_error_quark()
@@ -49,9 +49,8 @@ gvir_domain_disk_error_quark(void)
return g_quark_from_static_string("gvir-domain-disk");
}
-static void gvir_domain_disk_class_init(GVirDomainDiskClass *klass)
+static void gvir_domain_disk_class_init(GVirDomainDiskClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirDomainDiskPrivate));
}
static void gvir_domain_disk_init(GVirDomainDisk *self)
diff --git a/libvirt-gobject/libvirt-gobject-domain-interface.c b/libvirt-gobject/libvirt-gobject-domain-interface.c
index beae11e..f58d088 100644
--- a/libvirt-gobject/libvirt-gobject-domain-interface.c
+++ b/libvirt-gobject/libvirt-gobject-domain-interface.c
@@ -39,7 +39,7 @@ struct _GVirDomainInterfacePrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirDomainInterface, gvir_domain_interface, GVIR_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomainInterface, gvir_domain_interface, GVIR_TYPE_DOMAIN_DEVICE);
#define GVIR_DOMAIN_INTERFACE_ERROR gvir_domain_interface_error_quark()
@@ -49,9 +49,8 @@ gvir_domain_interface_error_quark(void)
return g_quark_from_static_string("gvir-domain-interface");
}
-static void gvir_domain_interface_class_init(GVirDomainInterfaceClass *klass)
+static void gvir_domain_interface_class_init(GVirDomainInterfaceClass *klass G_GNUC_UNUSED)
{
- g_type_class_add_private(klass, sizeof(GVirDomainInterfacePrivate));
}
static void gvir_domain_interface_init(GVirDomainInterface *self)
diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
index 2a4338b..decdc68 100644
--- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c
+++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
@@ -38,7 +38,7 @@ struct _GVirDomainSnapshotPrivate
virDomainSnapshotPtr handle;
};
-G_DEFINE_TYPE(GVirDomainSnapshot, gvir_domain_snapshot, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomainSnapshot, gvir_domain_snapshot, G_TYPE_OBJECT);
enum {
@@ -126,7 +126,6 @@ static void gvir_domain_snapshot_class_init(GVirDomainSnapshotClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirDomainSnapshotPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 7be936d..b522ff0 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -46,7 +46,7 @@ struct _GVirDomainPrivate
GMutex *lock;
};
-G_DEFINE_TYPE(GVirDomain, gvir_domain, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomain, gvir_domain, G_TYPE_OBJECT);
enum {
@@ -247,7 +247,6 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
G_TYPE_NONE,
0);
- g_type_class_add_private(klass, sizeof(GVirDomainPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-input-stream.c b/libvirt-gobject/libvirt-gobject-input-stream.c
index 788e16e..2df975c 100644
--- a/libvirt-gobject/libvirt-gobject-input-stream.c
+++ b/libvirt-gobject/libvirt-gobject-input-stream.c
@@ -31,9 +31,6 @@
#include "libvirt-gobject-input-stream.h"
#include "libvirt-gobject-compat.h"
-#define gvir_input_stream_get_type _gvir_input_stream_get_type
-G_DEFINE_TYPE(GVirInputStream, gvir_input_stream, G_TYPE_INPUT_STREAM);
-
enum
{
PROP_0,
@@ -50,6 +47,9 @@ struct _GVirInputStreamPrivate
gsize count;
};
+#define gvir_input_stream_get_type _gvir_input_stream_get_type
+G_DEFINE_TYPE_WITH_PRIVATE(GVirInputStream, gvir_input_stream, G_TYPE_INPUT_STREAM);
+
static void gvir_input_stream_get_property(GObject *object,
guint prop_id,
GValue *value,
@@ -196,7 +196,6 @@ static void gvir_input_stream_class_init(GVirInputStreamClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
GInputStreamClass *ginputstream_class = G_INPUT_STREAM_CLASS(klass);
- g_type_class_add_private(klass, sizeof(GVirInputStreamPrivate));
gobject_class->finalize = gvir_input_stream_finalize;
gobject_class->get_property = gvir_input_stream_get_property;
diff --git a/libvirt-gobject/libvirt-gobject-interface.c b/libvirt-gobject/libvirt-gobject-interface.c
index ed7421f..1bd75bd 100644
--- a/libvirt-gobject/libvirt-gobject-interface.c
+++ b/libvirt-gobject/libvirt-gobject-interface.c
@@ -38,7 +38,7 @@ struct _GVirInterfacePrivate
virInterfacePtr handle;
};
-G_DEFINE_TYPE(GVirInterface, gvir_interface, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirInterface, gvir_interface, G_TYPE_OBJECT);
enum {
@@ -126,7 +126,6 @@ static void gvir_interface_class_init(GVirInterfaceClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirInterfacePrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-manager.c b/libvirt-gobject/libvirt-gobject-manager.c
index bbd5f84..023df53 100644
--- a/libvirt-gobject/libvirt-gobject-manager.c
+++ b/libvirt-gobject/libvirt-gobject-manager.c
@@ -39,7 +39,7 @@ struct _GVirManagerPrivate
GList *connections;
};
-G_DEFINE_TYPE(GVirManager, gvir_manager, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirManager, gvir_manager, G_TYPE_OBJECT);
enum {
@@ -102,7 +102,6 @@ static void gvir_manager_class_init(GVirManagerClass *klass)
1,
GVIR_TYPE_CONNECTION);
- g_type_class_add_private(klass, sizeof(GVirManagerPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c b/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c
index 200778d..6bed50c 100644
--- a/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c
+++ b/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c
@@ -46,7 +46,7 @@ struct _GVirNetworkDHCPLeasePrivate
#endif /* HAVE_VIR_NETWORK_GET_DHCP_LEASES */
};
-G_DEFINE_TYPE(GVirNetworkDHCPLease, gvir_network_dhcp_lease, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNetworkDHCPLease, gvir_network_dhcp_lease, G_TYPE_OBJECT);
enum {
PROP_0,
@@ -124,7 +124,6 @@ static void gvir_network_dhcp_lease_class_init(GVirNetworkDHCPLeaseClass *klass)
G_PARAM_PRIVATE |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirNetworkDHCPLeasePrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-network-filter.c b/libvirt-gobject/libvirt-gobject-network-filter.c
index 7c5d6c0..d63d48a 100644
--- a/libvirt-gobject/libvirt-gobject-network-filter.c
+++ b/libvirt-gobject/libvirt-gobject-network-filter.c
@@ -39,7 +39,7 @@ struct _GVirNetworkFilterPrivate
gchar uuid[VIR_UUID_STRING_BUFLEN];
};
-G_DEFINE_TYPE(GVirNetworkFilter, gvir_network_filter, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNetworkFilter, gvir_network_filter, G_TYPE_OBJECT);
enum {
@@ -142,7 +142,6 @@ static void gvir_network_filter_class_init(GVirNetworkFilterClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirNetworkFilterPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-network.c b/libvirt-gobject/libvirt-gobject-network.c
index 0129a73..b607cf8 100644
--- a/libvirt-gobject/libvirt-gobject-network.c
+++ b/libvirt-gobject/libvirt-gobject-network.c
@@ -42,7 +42,7 @@ struct _GVirNetworkPrivate
gchar uuid[VIR_UUID_STRING_BUFLEN];
};
-G_DEFINE_TYPE(GVirNetwork, gvir_network, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNetwork, gvir_network, G_TYPE_OBJECT);
enum {
@@ -142,7 +142,6 @@ static void gvir_network_class_init(GVirNetworkClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirNetworkPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-node-device.c b/libvirt-gobject/libvirt-gobject-node-device.c
index b7b7c9e..ecc448c 100644
--- a/libvirt-gobject/libvirt-gobject-node-device.c
+++ b/libvirt-gobject/libvirt-gobject-node-device.c
@@ -38,7 +38,7 @@ struct _GVirNodeDevicePrivate
virNodeDevicePtr handle;
};
-G_DEFINE_TYPE(GVirNodeDevice, gvir_node_device, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNodeDevice, gvir_node_device, G_TYPE_OBJECT);
enum {
@@ -126,7 +126,6 @@ static void gvir_node_device_class_init(GVirNodeDeviceClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirNodeDevicePrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-output-stream.c b/libvirt-gobject/libvirt-gobject-output-stream.c
index 97feb80..6869b4d 100644
--- a/libvirt-gobject/libvirt-gobject-output-stream.c
+++ b/libvirt-gobject/libvirt-gobject-output-stream.c
@@ -31,9 +31,6 @@
#include "libvirt-gobject-output-stream.h"
#include "libvirt-gobject-compat.h"
-#define gvir_output_stream_get_type _gvir_output_stream_get_type
-G_DEFINE_TYPE(GVirOutputStream, gvir_output_stream, G_TYPE_OUTPUT_STREAM);
-
enum
{
PROP_0,
@@ -50,6 +47,9 @@ struct _GVirOutputStreamPrivate
gsize count;
};
+#define gvir_output_stream_get_type _gvir_output_stream_get_type
+G_DEFINE_TYPE_WITH_PRIVATE(GVirOutputStream, gvir_output_stream, G_TYPE_OUTPUT_STREAM);
+
static void gvir_output_stream_get_property(GObject *object,
guint prop_id,
GValue *value,
@@ -196,7 +196,6 @@ static void gvir_output_stream_class_init(GVirOutputStreamClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
GOutputStreamClass *goutputstream_class = G_OUTPUT_STREAM_CLASS(klass);
- g_type_class_add_private(klass, sizeof(GVirOutputStreamPrivate));
gobject_class->finalize = gvir_output_stream_finalize;
gobject_class->get_property = gvir_output_stream_get_property;
diff --git a/libvirt-gobject/libvirt-gobject-secret.c b/libvirt-gobject/libvirt-gobject-secret.c
index bf15931..81f72b8 100644
--- a/libvirt-gobject/libvirt-gobject-secret.c
+++ b/libvirt-gobject/libvirt-gobject-secret.c
@@ -39,7 +39,7 @@ struct _GVirSecretPrivate
gchar uuid[VIR_UUID_STRING_BUFLEN];
};
-G_DEFINE_TYPE(GVirSecret, gvir_secret, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSecret, gvir_secret, G_TYPE_OBJECT);
enum {
@@ -141,7 +141,6 @@ static void gvir_secret_class_init(GVirSecretClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirSecretPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-storage-pool.c b/libvirt-gobject/libvirt-gobject-storage-pool.c
index 227bf23..175b6f0 100644
--- a/libvirt-gobject/libvirt-gobject-storage-pool.c
+++ b/libvirt-gobject/libvirt-gobject-storage-pool.c
@@ -43,7 +43,7 @@ struct _GVirStoragePoolPrivate
gchar uuid[VIR_UUID_STRING_BUFLEN];
};
-G_DEFINE_TYPE(GVirStoragePool, gvir_storage_pool, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirStoragePool, gvir_storage_pool, G_TYPE_OBJECT);
enum {
@@ -153,7 +153,6 @@ static void gvir_storage_pool_class_init(GVirStoragePoolClass *klass)
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirStoragePoolPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-storage-vol.c b/libvirt-gobject/libvirt-gobject-storage-vol.c
index 18aa8b3..2a9c67f 100644
--- a/libvirt-gobject/libvirt-gobject-storage-vol.c
+++ b/libvirt-gobject/libvirt-gobject-storage-vol.c
@@ -41,7 +41,7 @@ struct _GVirStorageVolPrivate
GVirStoragePool *pool;
};
-G_DEFINE_TYPE(GVirStorageVol, gvir_storage_vol, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirStorageVol, gvir_storage_vol, G_TYPE_OBJECT);
enum {
@@ -148,7 +148,6 @@ static void gvir_storage_vol_class_init(GVirStorageVolClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirStorageVolPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-stream.c b/libvirt-gobject/libvirt-gobject-stream.c
index a518a19..c175353 100644
--- a/libvirt-gobject/libvirt-gobject-stream.c
+++ b/libvirt-gobject/libvirt-gobject-stream.c
@@ -58,7 +58,7 @@ typedef struct {
} GVirStreamSource;
-G_DEFINE_TYPE(GVirStream, gvir_stream, G_TYPE_IO_STREAM);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirStream, gvir_stream, G_TYPE_IO_STREAM);
enum {
@@ -279,7 +279,6 @@ static void gvir_stream_class_init(GVirStreamClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- g_type_class_add_private(klass, sizeof(GVirStreamPrivate));
}
--
2.16.4
6 years, 4 months
[libvirt] [PATCH v2 0/3] vsh: Introduce new API for printing tables
by Simon Kobyda
Created new API for priting tables, mainly to solve alignment problems.
Implemented these test to virsh list. In the future, API may be
everywhere in virsh and virt-admin.
Also wrote basic tests for the new API, and corrected tests in virshtest
which are influenced by implementation of the API in virsh list.
Diff to v2:
- added tests
- fixed alignment for unicode character which span more spaces
- moved ncolumns check to vshTableRowAppend
- changed arguments for functions vshTablePrint, vshTablePrintToStdout,
vshTablePrintToString
Simon Kobyda (3):
vsh: Add API for printing tables.
virsh: Implement new table API for virsh list
vsh: Added tests
tests/Makefile.am | 8 +
tests/virshtest.c | 14 +-
tests/vshtabletest.c | 247 +++++++++++++++++++++
tools/Makefile.am | 4 +-
tools/virsh-domain-monitor.c | 43 ++--
tools/vsh-table.c | 413 +++++++++++++++++++++++++++++++++++
tools/vsh-table.h | 42 ++++
7 files changed, 744 insertions(+), 27 deletions(-)
create mode 100644 tests/vshtabletest.c
create mode 100644 tools/vsh-table.c
create mode 100644 tools/vsh-table.h
--
2.17.1
6 years, 4 months