提交 7136fc1d 编写于 作者: M Markus Armbruster 提交者: Paolo Bonzini

include/crypto: Include qapi-types.h or qemu/bswap.h instead of qemu-common.h

qemu-common.h should only be included by .c files.  Its file comment
explains why: "No header file should depend on qemu-common.h, as this
would easily lead to circular header dependencies."

Several include/crypto/ headers include qemu-common.h, but either need
just qapi-types.h from it, or qemu/bswap.h, or nothing at all.  Replace or
drop the include accordingly.  tests/test-crypto-secret.c now misses
qemu/module.h, so include it there.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 bd36a618
......@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/bswap.h"
#include "crypto/ivgen-essiv.h"
typedef struct QCryptoIVGenESSIV QCryptoIVGenESSIV;
......
......@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/bswap.h"
#include "crypto/ivgen-plain.h"
static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen,
......
......@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/bswap.h"
#include "crypto/ivgen-plain.h"
static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen,
......
......@@ -21,7 +21,7 @@
#ifndef QCRYPTO_CIPHER_H__
#define QCRYPTO_CIPHER_H__
#include "qemu-common.h"
#include "qapi-types.h"
typedef struct QCryptoCipher QCryptoCipher;
......
......@@ -21,7 +21,7 @@
#ifndef QCRYPTO_HASH_H__
#define QCRYPTO_HASH_H__
#include "qemu-common.h"
#include "qapi-types.h"
/* See also "QCryptoHashAlgorithm" defined in qapi/crypto.json */
......
......@@ -21,8 +21,6 @@
#ifndef QCRYPTO_INIT_H__
#define QCRYPTO_INIT_H__
#include "qemu-common.h"
int qcrypto_init(Error **errp);
#endif /* QCRYPTO_INIT_H__ */
......@@ -21,7 +21,6 @@
#ifndef QCRYPTO_SECRET_H__
#define QCRYPTO_SECRET_H__
#include "qemu-common.h"
#include "qom/object.h"
#define TYPE_QCRYPTO_SECRET "secret"
......
......@@ -21,7 +21,6 @@
#ifndef QCRYPTO_TLSCRED_H__
#define QCRYPTO_TLSCRED_H__
#include "qemu-common.h"
#include "qom/object.h"
#ifdef CONFIG_GNUTLS
......
......@@ -24,6 +24,7 @@
#include "crypto/init.h"
#include "crypto/secret.h"
#include "qapi/error.h"
#include "qemu/module.h"
static void test_secret_direct(void)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册