From afeeead1bcd1080a621500240ea74ec433b21885 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 26 Sep 2014 16:46:03 -0300 Subject: bitops.h: Don't include qemu-common.h This removes the following circular dependency: bitops.h -> qemu-common.h -> target-i386/cpu.h -> target-i386/cpu-qom.h -> qom/cpu.h -> qdev-core.h -> bitmap.h -> bitops.h. Signed-off-by: Eduardo Habkost Signed-off-by: Michael Tokarev --- include/qemu/bitops.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 7e2d5c996e..181bd46063 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -12,7 +12,9 @@ #ifndef BITOPS_H #define BITOPS_H -#include "qemu-common.h" +#include +#include + #include "host-utils.h" #define BITS_PER_BYTE CHAR_BIT -- cgit v1.2.3 From d6aaddfe977417e3df4fc8a0fc0b4cc015909b84 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 26 Sep 2014 16:46:04 -0300 Subject: bitmap.h: Don't include qemu-common.h This will avoid unexpected circular header dependencies in the future. Signed-off-by: Eduardo Habkost Signed-off-by: Michael Tokarev --- include/qemu/bitmap.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index edf4f17d9c..f0273c965f 100644 --- a/include/qemu/bitmap.h +++ b/include/qemu/bitmap.h @@ -12,7 +12,11 @@ #ifndef BITMAP_H #define BITMAP_H -#include "qemu-common.h" +#include +#include +#include + +#include "qemu/osdep.h" #include "qemu/bitops.h" /* -- cgit v1.2.3 From fee78fd6d2f8dfdfd447a33c34323dd5bd3193a2 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Thu, 30 Oct 2014 17:40:48 +0300 Subject: pidfile: stop making pidfile error a special case In case of -daemonize, we write non-zero to the daemon pipe only if pidfile creation failed, so the parent will report error about pidfile problem. There's no need to make special case for this, since all other errors are reported by the child just fine. Let the parent report error and simplify logic in os_daemonize(). This way, we don't need os_pidfile_error() function, since it only prints error now, so put the error reporting printf into the only place where qemu_create_pidfile() is called, in vl.c. While at it, fix wrong indentation in os_daemonize(). Signed-off-by: Michael Tokarev --- include/qemu-common.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/qemu-common.h b/include/qemu-common.h index b87e9c2d8b..f8622141a8 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -357,7 +357,6 @@ char *qemu_find_file(int type, const char *name); void os_setup_early_signal_handling(void); char *os_find_datadir(void); void os_parse_cmd_args(int index, const char *optarg); -void os_pidfile_error(void); /* Convert a byte between binary and BCD. */ static inline uint8_t to_bcd(uint8_t val) -- cgit v1.2.3