summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2016-03-14 09:01:28 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-22 22:20:15 +0100
commitda34e65cb4025728566d6504a99916f6e7e1dd6a (patch)
tree79cc0f5cfc5b02ead1a6730a3c568a5fd00b6dac /crypto
parent4829e0378dfb91d55af9dfd741bd09e8f2c4f91a (diff)
downloadqemu-da34e65cb4025728566d6504a99916f6e7e1dd6a.tar.gz
include/qemu/osdep.h: Don't include qapi/error.h
Commit 57cb38b included qapi/error.h into qemu/osdep.h to get the Error typedef. Since then, we've moved to include qemu/osdep.h everywhere. Its file comment explains: "To avoid getting into possible circular include dependencies, this file should not include any other QEMU headers, with the exceptions of config-host.h, compiler.h, os-posix.h and os-win32.h, all of which are doing a similar job to this file and are under similar constraints." qapi/error.h doesn't do a similar job, and it doesn't adhere to similar constraints: it includes qapi-types.h. That's in excess of 100KiB of crap most .c files don't actually need. Add the typedef to qemu/typedefs.h, and include that instead of qapi/error.h. Include qapi/error.h in .c files that need it and don't get it now. Include qapi-types.h in qom/object.h for uint16List. Update scripts/clean-includes accordingly. Update it further to match reality: replace config.h by config-target.h, add sysemu/os-posix.h, sysemu/os-win32.h. Update the list of includes in the qemu/osdep.h comment quoted above similarly. This reduces the number of objects depending on qapi/error.h from "all of them" to less than a third. Unfortunately, the number depending on qapi-types.h shrinks only a little. More work is needed for that one. Signed-off-by: Markus Armbruster <armbru@redhat.com> [Fix compilation without the spice devel packages. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/block-luks.c1
-rw-r--r--crypto/block-qcow.c1
-rw-r--r--crypto/block.c1
-rw-r--r--crypto/cipher.c1
-rw-r--r--crypto/hash.c1
-rw-r--r--crypto/init.c1
-rw-r--r--crypto/ivgen-essiv.c1
-rw-r--r--crypto/ivgen-plain.c1
-rw-r--r--crypto/ivgen-plain64.c1
-rw-r--r--crypto/ivgen.c2
-rw-r--r--crypto/pbkdf-gcrypt.c1
-rw-r--r--crypto/pbkdf-nettle.c1
-rw-r--r--crypto/pbkdf-stub.c1
-rw-r--r--crypto/pbkdf.c1
-rw-r--r--crypto/secret.c1
-rw-r--r--crypto/tlscreds.c1
-rw-r--r--crypto/tlscredsanon.c1
-rw-r--r--crypto/tlscredsx509.c1
-rw-r--r--crypto/tlssession.c1
19 files changed, 20 insertions, 0 deletions
diff --git a/crypto/block-luks.c b/crypto/block-luks.c
index 58c1b940e1..439f89230c 100644
--- a/crypto/block-luks.c
+++ b/crypto/block-luks.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/block-luks.h"
diff --git a/crypto/block-qcow.c b/crypto/block-qcow.c
index 9f378e8635..be88c6f0ef 100644
--- a/crypto/block-qcow.c
+++ b/crypto/block-qcow.c
@@ -25,6 +25,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/block-qcow.h"
#include "crypto/secret.h"
diff --git a/crypto/block.c b/crypto/block.c
index 524ed91db8..da60eba85f 100644
--- a/crypto/block.c
+++ b/crypto/block.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/blockpriv.h"
#include "crypto/block-qcow.h"
#include "crypto/block-luks.h"
diff --git a/crypto/cipher.c b/crypto/cipher.c
index 5402d18525..cafb454363 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/cipher.h"
diff --git a/crypto/hash.c b/crypto/hash.c
index 4a8c0caea1..b90af3495a 100644
--- a/crypto/hash.c
+++ b/crypto/hash.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/hash.h"
#ifdef CONFIG_GNUTLS_HASH
diff --git a/crypto/init.c b/crypto/init.c
index 31eea19bc9..1e564d9492 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "crypto/init.h"
+#include "qapi/error.h"
#include "qemu/thread.h"
#ifdef CONFIG_GNUTLS
diff --git a/crypto/ivgen-essiv.c b/crypto/ivgen-essiv.c
index 5649c01b85..2fd89def0f 100644
--- a/crypto/ivgen-essiv.c
+++ b/crypto/ivgen-essiv.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/ivgen-essiv.h"
typedef struct QCryptoIVGenESSIV QCryptoIVGenESSIV;
diff --git a/crypto/ivgen-plain.c b/crypto/ivgen-plain.c
index 6a85256cac..a56675d592 100644
--- a/crypto/ivgen-plain.c
+++ b/crypto/ivgen-plain.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/ivgen-plain.h"
static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen,
diff --git a/crypto/ivgen-plain64.c b/crypto/ivgen-plain64.c
index 9ca6db9df2..94d86730fb 100644
--- a/crypto/ivgen-plain64.c
+++ b/crypto/ivgen-plain64.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/ivgen-plain.h"
static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen,
diff --git a/crypto/ivgen.c b/crypto/ivgen.c
index 4ffc1eb886..f66435112b 100644
--- a/crypto/ivgen.c
+++ b/crypto/ivgen.c
@@ -19,6 +19,8 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
+
#include "crypto/ivgenpriv.h"
#include "crypto/ivgen-plain.h"
#include "crypto/ivgen-plain64.h"
diff --git a/crypto/pbkdf-gcrypt.c b/crypto/pbkdf-gcrypt.c
index 885614dfcc..997b311d84 100644
--- a/crypto/pbkdf-gcrypt.c
+++ b/crypto/pbkdf-gcrypt.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "gcrypt.h"
diff --git a/crypto/pbkdf-nettle.c b/crypto/pbkdf-nettle.c
index 1aa7395ea5..db9fc15780 100644
--- a/crypto/pbkdf-nettle.c
+++ b/crypto/pbkdf-nettle.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "nettle/pbkdf2.h"
diff --git a/crypto/pbkdf-stub.c b/crypto/pbkdf-stub.c
index cfc30d3c2a..266a5051b7 100644
--- a/crypto/pbkdf-stub.c
+++ b/crypto/pbkdf-stub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash G_GNUC_UNUSED)
diff --git a/crypto/pbkdf.c b/crypto/pbkdf.c
index 90721d85d6..695cc35df1 100644
--- a/crypto/pbkdf.c
+++ b/crypto/pbkdf.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
#ifndef _WIN32
#include <sys/resource.h>
diff --git a/crypto/secret.c b/crypto/secret.c
index be736f2cd5..285ab7a63c 100644
--- a/crypto/secret.c
+++ b/crypto/secret.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "crypto/secret.h"
#include "crypto/cipher.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "qemu/base64.h"
#include "trace.h"
diff --git a/crypto/tlscreds.c b/crypto/tlscreds.c
index fc99589c22..1620e126ae 100644
--- a/crypto/tlscreds.c
+++ b/crypto/tlscreds.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/tlscredspriv.h"
#include "trace.h"
diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c
index f36a793d16..1464220080 100644
--- a/crypto/tlscredsanon.c
+++ b/crypto/tlscredsanon.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "crypto/tlscredsanon.h"
#include "crypto/tlscredspriv.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "trace.h"
diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
index 99130433fd..6a0179c2e1 100644
--- a/crypto/tlscredsx509.c
+++ b/crypto/tlscredsx509.c
@@ -22,6 +22,7 @@
#include "crypto/tlscredsx509.h"
#include "crypto/tlscredspriv.h"
#include "crypto/secret.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "trace.h"
diff --git a/crypto/tlssession.c b/crypto/tlssession.c
index e0d9658e80..a543e5a576 100644
--- a/crypto/tlssession.c
+++ b/crypto/tlssession.c
@@ -22,6 +22,7 @@
#include "crypto/tlssession.h"
#include "crypto/tlscredsanon.h"
#include "crypto/tlscredsx509.h"
+#include "qapi/error.h"
#include "qemu/acl.h"
#include "trace.h"