From 2e5de445a159f2627dbd3ec2c90bfb2310d4eb74 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 5 Apr 2017 15:38:37 +0200 Subject: [PATCH] qemu: Move some functions to qemu_capspriv.h This header file has been created so that we can expose internal functions to the test suite without making them public: those in qemu_capabilities.h bearing the comment /* Only for use by test suite */ are obvious candidates for being moved over. --- src/qemu/qemu_capabilities.h | 19 ------------------- src/qemu/qemu_capspriv.h | 22 ++++++++++++++++++++++ tests/qemuhelptest.c | 4 ++++ 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 24e2f38ee0..cca9a12b5c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -473,11 +473,6 @@ bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps, void virQEMUCapsFilterByMachineType(virQEMUCapsPtr qemuCaps, const char *machineType); -/* Only for use by test suite */ -void virQEMUCapsSetGICCapabilities(virQEMUCapsPtr qemuCaps, - virGICCapability *capabilities, - size_t ncapabilities); - virQEMUCapsCachePtr virQEMUCapsCacheNew(const char *libDir, const char *cacheDir, uid_t uid, gid_t gid); @@ -499,20 +494,6 @@ int virQEMUCapsGetDefaultVersion(virCapsPtr caps, virQEMUCapsCachePtr capsCache, unsigned int *version); -/* Only for use by test suite */ -int virQEMUCapsParseHelpStr(const char *qemu, - const char *str, - virQEMUCapsPtr qemuCaps, - unsigned int *version, - bool *is_kvm, - unsigned int *kvm_version, - bool check_yajl, - const char *qmperr); -/* Only for use by test suite */ -int virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, const char *str); -/* Only for use by test suite */ -void virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps); - VIR_ENUM_DECL(virQEMUCaps); bool virQEMUCapsSupportsChardev(const virDomainDef *def, diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 61ccd45178..9818859988 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -83,6 +83,9 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, virDomainVirtType type, virCPUDefPtr cpu); +void +virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps); + void virQEMUCapsSetCPUModelInfo(virQEMUCapsPtr qemuCaps, virDomainVirtType type, @@ -92,4 +95,23 @@ virCPUDefPtr virQEMUCapsProbeHostCPUForEmulator(virCapsPtr caps, virQEMUCapsPtr qemuCaps, virDomainVirtType type); + +void +virQEMUCapsSetGICCapabilities(virQEMUCapsPtr qemuCaps, + virGICCapability *capabilities, + size_t ncapabilities); + +int +virQEMUCapsParseHelpStr(const char *qemu, + const char *str, + virQEMUCapsPtr qemuCaps, + unsigned int *version, + bool *is_kvm, + unsigned int *kvm_version, + bool check_yajl, + const char *qmperr); + +int +virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, + const char *str); #endif diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index e3751b2d03..d80225c1d9 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -8,6 +8,10 @@ # include # include "qemu/qemu_capabilities.h" +# define __QEMU_CAPSPRIV_H_ALLOW__ +# include "qemu/qemu_capspriv.h" +# undef __QEMU_CAPSPRIV_H_ALLOW__ + # include "viralloc.h" # include "virstring.h" -- GitLab