Skip to content

Commit

Permalink
util: move declarations out of qemu-common.h
Browse files Browse the repository at this point in the history
Move declarations out of qemu-common.h for functions declared in
utils/ files: e.g. include/qemu/path.h for utils/path.c.
Move inline functions out of qemu-common.h and into new files (e.g.
include/qemu/bcd.h)

Signed-off-by: Veronia Bahaa <veroniabahaa@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
veronia-iskandar authored and bonzini committed Mar 22, 2016
1 parent 73bcb24 commit f348b6d
Show file tree
Hide file tree
Showing 149 changed files with 435 additions and 300 deletions.
1 change: 1 addition & 0 deletions arch_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "qemu/error-report.h"
#include "qmp-commands.h"
#include "hw/acpi/acpi.h"
#include "qemu/help_option.h"

#ifdef TARGET_SPARC
int graphic_width = 1024;
Expand Down
1 change: 1 addition & 0 deletions audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "monitor/monitor.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "qemu/cutils.h"

#define AUDIO_CAP "audio"
#include "audio_int.h"
Expand Down
3 changes: 2 additions & 1 deletion block.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
Expand All @@ -40,6 +39,8 @@
#include "qemu/timer.h"
#include "qapi-event.h"
#include "block/throttle-groups.h"
#include "qemu/cutils.h"
#include "qemu/id.h"

#ifdef CONFIG_BSD
#include <sys/ioctl.h>
Expand Down
2 changes: 1 addition & 1 deletion block/archipelago.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "block/block_int.h"
#include "qemu/error-report.h"
#include "qemu/thread.h"
Expand Down
1 change: 1 addition & 0 deletions block/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "qemu/cutils.h"
#include "sysemu/block-backend.h"
#include "qemu/bitmap.h"

Expand Down
2 changes: 1 addition & 1 deletion block/blkdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "qemu/config-file.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions block/blkverify.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "block/block_int.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
#include "qemu/cutils.h"

typedef struct {
BdrvChild *test_file;
Expand Down
1 change: 1 addition & 0 deletions block/block-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "qapi-event.h"
#include "qemu/id.h"

/* Number of coroutines to reserve per attached device model */
#define COROUTINE_POOL_RESERVATION 64
Expand Down
1 change: 1 addition & 0 deletions block/curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "qapi/qmp/qstring.h"
#include "crypto/secret.h"
#include <curl/curl.h>
#include "qemu/cutils.h"

// #define DEBUG_CURL
// #define DEBUG_VERBOSE
Expand Down
1 change: 1 addition & 0 deletions block/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "block/blockjob.h"
#include "block/block_int.h"
#include "block/throttle-groups.h"
#include "qemu/cutils.h"
#include "qapi/error.h"
#include "qemu/error-report.h"

Expand Down
2 changes: 1 addition & 1 deletion block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qstring.h"

#include "qemu/cutils.h"

#define EN_OPTSTR ":exportname="

Expand Down
1 change: 1 addition & 0 deletions block/qapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "qapi/qmp-output-visitor.h"
#include "qapi/qmp/types.h"
#include "sysemu/block-backend.h"
#include "qemu/cutils.h"

BlockDeviceInfo *bdrv_block_device_info(BlockDriverState *bs, Error **errp)
{
Expand Down
2 changes: 1 addition & 1 deletion block/qcow2-snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
#include "qemu/error-report.h"
#include "qemu/cutils.h"

void qcow2_free_snapshots(BlockDriverState *bs)
{
Expand Down
2 changes: 1 addition & 1 deletion block/qcow2.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
#include "qemu/module.h"
Expand All @@ -36,6 +35,7 @@
#include "qapi-event.h"
#include "trace.h"
#include "qemu/option_int.h"
#include "qemu/cutils.h"

/*
Differences with QCOW:
Expand Down
1 change: 1 addition & 0 deletions block/qed.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define BLOCK_QED_H

#include "block/block_int.h"
#include "qemu/cutils.h"

/* The layout of a QED file is as follows:
*
Expand Down
2 changes: 1 addition & 1 deletion block/raw-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "qemu/log.h"
Expand Down
2 changes: 1 addition & 1 deletion block/raw-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "qemu/timer.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
2 changes: 1 addition & 1 deletion block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include "qemu/osdep.h"

#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "block/block_int.h"
#include "crypto/secret.h"
#include "qemu/cutils.h"

#include <rbd/librbd.h>

Expand Down
2 changes: 1 addition & 1 deletion block/sheepdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/uri.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
#include "qemu/bitops.h"
#include "qemu/cutils.h"

#define SD_PROTO_VER 0x01

Expand Down
2 changes: 1 addition & 1 deletion block/vdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
#include "qemu/module.h"
#include "migration/migration.h"
#include "qemu/coroutine.h"
#include "qemu/cutils.h"

#if defined(CONFIG_UUID)
#include <uuid/uuid.h>
Expand Down
2 changes: 1 addition & 1 deletion block/vmdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "migration/migration.h"
#include "qemu/cutils.h"
#include <zlib.h>
#include <glib.h>

Expand Down
2 changes: 1 addition & 1 deletion block/vvfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
#include "qemu/osdep.h"
#include <dirent.h>
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "migration/migration.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qstring.h"
#include "qemu/cutils.h"

#ifndef S_IWGRP
#define S_IWGRP 0
Expand Down
2 changes: 2 additions & 0 deletions blockdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#include "qmp-commands.h"
#include "trace.h"
#include "sysemu/arch_init.h"
#include "qemu/cutils.h"
#include "qemu/help_option.h"

static QTAILQ_HEAD(, BlockDriverState) monitor_bdrv_states =
QTAILQ_HEAD_INITIALIZER(monitor_bdrv_states);
Expand Down
1 change: 1 addition & 0 deletions bsd-user/elfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "qemu.h"
#include "disas/disas.h"
#include "qemu/path.h"

#ifdef _ARCH_PPC64
#undef ARCH_DLINFO
Expand Down
3 changes: 2 additions & 1 deletion bsd-user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include <sys/mman.h>

#include "qemu.h"
#include "qemu-common.h"
#include "qemu/path.h"
#include "qemu/help_option.h"
/* For tb_lock */
#include "cpu.h"
#include "tcg.h"
Expand Down
2 changes: 1 addition & 1 deletion contrib/ivshmem-server/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/cutils.h"

#include "ivshmem-server.h"

Expand Down
2 changes: 2 additions & 0 deletions disas/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#include "qemu/osdep.h"
#include "disas/bfd.h"
#include "qemu/cutils.h"

/* include/opcode/i386.h r1.78 */

/* opcode/i386.h -- Intel 80386 opcode macros
Expand Down
2 changes: 1 addition & 1 deletion dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "elf.h"
#include "cpu.h"
#include "exec/cpu-all.h"
Expand Down
2 changes: 1 addition & 1 deletion exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <sys/mman.h>
#endif

#include "qemu-common.h"
#include "qemu/cutils.h"
#include "cpu.h"
#include "tcg.h"
#include "hw/hw.h"
Expand Down
4 changes: 2 additions & 2 deletions gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#ifdef CONFIG_USER_ONLY
#include "qemu/cutils.h"

#ifdef CONFIG_USER_ONLY
#include "qemu.h"
#else
#include "monitor/monitor.h"
Expand Down
1 change: 1 addition & 0 deletions hmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "ui/console.h"
#include "block/qapi.h"
#include "qemu-io.h"
#include "qemu/cutils.h"

#ifdef CONFIG_SPICE
#include <spice/enums.h>
Expand Down
1 change: 1 addition & 0 deletions hw/9pfs/9p-handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include "qemu/xattr.h"
#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include <linux/fs.h>
#ifdef CONFIG_LINUX_MAGIC_H
Expand Down
1 change: 1 addition & 0 deletions hw/9pfs/9p-local.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include "qemu/xattr.h"
#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include <libgen.h>
#include <linux/fs.h>
Expand Down
1 change: 1 addition & 0 deletions hw/9pfs/9p-proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include "9p.h"
#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include "fsdev/qemu-fsdev.h"
#include "9p-proxy.h"
Expand Down
1 change: 1 addition & 0 deletions hw/9pfs/9p-synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "9p-synth.h"
#include "qemu/rcu.h"
#include "qemu/rcu_queue.h"
#include "qemu/cutils.h"

/* Root node for synth file system */
static V9fsSynthNode v9fs_synth_root = {
Expand Down
1 change: 1 addition & 0 deletions hw/alpha/dp264.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "hw/ide.h"
#include "hw/timer/i8254.h"
#include "hw/char/serial.h"
#include "qemu/cutils.h"

#define MAX_IDE_BUS 2

Expand Down
2 changes: 1 addition & 1 deletion hw/arm/nseries.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "sysemu/sysemu.h"
#include "hw/arm/omap.h"
#include "hw/arm/arm.h"
Expand Down
2 changes: 2 additions & 0 deletions hw/arm/omap1.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "sysemu/blockdev.h"
#include "qemu/range.h"
#include "hw/sysbus.h"
#include "qemu/cutils.h"
#include "qemu/bcd.h"

/* Should signal the TCMI/GPMC */
uint32_t omap_badwidth_read8(void *opaque, hwaddr addr)
Expand Down
1 change: 1 addition & 0 deletions hw/arm/pxa2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "sysemu/char.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "qemu/cutils.h"

static struct {
hwaddr io_base;
Expand Down
1 change: 1 addition & 0 deletions hw/arm/strongarm.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "sysemu/char.h"
#include "sysemu/sysemu.h"
#include "hw/ssi/ssi.h"
#include "qemu/cutils.h"

//#define DEBUG

Expand Down
1 change: 1 addition & 0 deletions hw/block/nvme.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef HW_NVME_H
#define HW_NVME_H
#include "qemu/cutils.h"

typedef struct NvmeBar {
uint64_t cap;
Expand Down
Loading

0 comments on commit f348b6d

Please sign in to comment.