Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
all: Clean up includes
Browse files Browse the repository at this point in the history
Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.

This commit was created with scripts/clean-includes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Feb 4, 2016
1 parent ccd241b commit d38ea87
Show file tree
Hide file tree
Showing 65 changed files with 66 additions and 101 deletions.
1 change: 1 addition & 0 deletions accel.c
Expand Up @@ -23,6 +23,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "sysemu/accel.h"
#include "hw/boards.h"
#include "qemu-common.h"
Expand Down
1 change: 1 addition & 0 deletions aio-posix.c
Expand Up @@ -13,6 +13,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block.h"
#include "qemu/queue.h"
Expand Down
1 change: 1 addition & 0 deletions aio-win32.c
Expand Up @@ -15,6 +15,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block.h"
#include "qemu/queue.h"
Expand Down
2 changes: 1 addition & 1 deletion arch_init.c
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <stdint.h>
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "sysemu/arch_init.h"
#include "hw/pci/pci.h"
Expand Down
1 change: 1 addition & 0 deletions async.c
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/aio.h"
#include "block/thread-pool.h"
Expand Down
1 change: 1 addition & 0 deletions balloon.c
Expand Up @@ -24,6 +24,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "exec/cpu-common.h"
#include "sysemu/kvm.h"
Expand Down
4 changes: 1 addition & 3 deletions block.c
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "config-host.h"
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "trace.h"
#include "block/block_int.h"
Expand All @@ -42,8 +42,6 @@
#include "block/throttle-groups.h"

#ifdef CONFIG_BSD
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/queue.h>
#ifndef __DragonFly__
Expand Down
1 change: 1 addition & 0 deletions blockdev-nbd.c
Expand Up @@ -9,6 +9,7 @@
* later. See the COPYING file in the top-level directory.
*/

#include "qemu/osdep.h"
#include "sysemu/blockdev.h"
#include "sysemu/block-backend.h"
#include "hw/block/block.h"
Expand Down
1 change: 1 addition & 0 deletions blockdev.c
Expand Up @@ -30,6 +30,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "hw/block/block.h"
Expand Down
2 changes: 1 addition & 1 deletion blockjob.c
Expand Up @@ -23,7 +23,7 @@
* THE SOFTWARE.
*/

#include "config-host.h"
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "trace.h"
#include "block/block.h"
Expand Down
1 change: 1 addition & 0 deletions bootdevice.c
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "qapi/visitor.h"
#include "qemu/error-report.h"
Expand Down
2 changes: 1 addition & 1 deletion bt-host.c
Expand Up @@ -17,12 +17,12 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "sysemu/bt.h"
#include "qemu/main-loop.h"

#ifndef _WIN32
# include <errno.h>
# include <sys/ioctl.h>
# include <sys/uio.h>
# ifdef CONFIG_BLUEZ
Expand Down
1 change: 1 addition & 0 deletions bt-vhci.c
Expand Up @@ -17,6 +17,7 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "sysemu/bt.h"
#include "hw/bt.h"
Expand Down
1 change: 1 addition & 0 deletions device-hotplug.c
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "sysemu/block-backend.h"
Expand Down
7 changes: 1 addition & 6 deletions device_tree.c
Expand Up @@ -11,12 +11,7 @@
*
*/

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include "qemu/osdep.h"

#include "qemu-common.h"
#include "qemu/error-report.h"
Expand Down
3 changes: 1 addition & 2 deletions disas.c
@@ -1,9 +1,8 @@
/* General "disassemble this chunk" code. Used for debugging. */
#include "config.h"
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "disas/bfd.h"
#include "elf.h"
#include <errno.h>

#include "cpu.h"
#include "disas/disas.h"
Expand Down
1 change: 1 addition & 0 deletions dma-helpers.c
Expand Up @@ -7,6 +7,7 @@
* (GNU GPL), version 2 or later.
*/

#include "qemu/osdep.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include "trace.h"
Expand Down
2 changes: 1 addition & 1 deletion dump.c
Expand Up @@ -11,6 +11,7 @@
*
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "elf.h"
#include "cpu.h"
Expand All @@ -22,7 +23,6 @@
#include "sysemu/sysemu.h"
#include "sysemu/memory_mapping.h"
#include "sysemu/cpus.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qmp-commands.h"

Expand Down
3 changes: 1 addition & 2 deletions fpu/softfloat.c
Expand Up @@ -82,12 +82,11 @@ this code that are retained.
/* softfloat (and in particular the code in softfloat-specialize.h) is
* target-dependent and needs the TARGET_* macros.
*/
#include "config.h"
#include "qemu/osdep.h"

#include "fpu/softfloat.h"

/* We only need stdlib for abort() */
#include <stdlib.h>

/*----------------------------------------------------------------------------
| Primitive arithmetic functions, including multi-word arithmetic, and
Expand Down
9 changes: 1 addition & 8 deletions gdbstub.c
Expand Up @@ -16,16 +16,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "qemu/osdep.h"
#include "qemu-common.h"
#ifdef CONFIG_USER_ONLY
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>

#include "qemu.h"
#else
Expand Down
1 change: 1 addition & 0 deletions hmp.c
Expand Up @@ -13,6 +13,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/

#include "qemu/osdep.h"
#include "hmp.h"
#include "net/net.h"
#include "net/eth.h"
Expand Down
2 changes: 1 addition & 1 deletion iohandler.c
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/

#include "config-host.h"
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/queue.h"
#include "block/aio.h"
Expand Down
1 change: 1 addition & 0 deletions ioport.c
Expand Up @@ -25,6 +25,7 @@
* splitted out ioport related stuffs from vl.c.
*/

#include "qemu/osdep.h"
#include "exec/ioport.h"
#include "trace.h"
#include "exec/memory.h"
Expand Down
1 change: 1 addition & 0 deletions iothread.c
Expand Up @@ -11,6 +11,7 @@
*
*/

#include "qemu/osdep.h"
#include "qom/object.h"
#include "qom/object_interfaces.h"
#include "qemu/module.h"
Expand Down
3 changes: 1 addition & 2 deletions kvm-all.c
Expand Up @@ -13,10 +13,9 @@
*
*/

#include <sys/types.h>
#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <stdarg.h>

#include <linux/kvm.h>

Expand Down
1 change: 1 addition & 0 deletions kvm-stub.c
Expand Up @@ -10,6 +10,7 @@
*
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "hw/hw.h"
#include "cpu.h"
Expand Down
1 change: 1 addition & 0 deletions main-loop.c
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/timer.h"
#include "qemu/sockets.h" // struct in_addr needed for libslirp.h
Expand Down
2 changes: 1 addition & 1 deletion memory.c
Expand Up @@ -13,6 +13,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/

#include "qemu/osdep.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "exec/ioport.h"
Expand All @@ -21,7 +22,6 @@
#include "qemu/error-report.h"
#include "qom/object.h"
#include "trace.h"
#include <assert.h>

#include "exec/memory-internal.h"
#include "exec/ram_addr.h"
Expand Down
1 change: 1 addition & 0 deletions memory_mapping.c
Expand Up @@ -11,6 +11,7 @@
*
*/

#include "qemu/osdep.h"
#include <glib.h>

#include "qemu-common.h"
Expand Down
2 changes: 1 addition & 1 deletion module-common.c
@@ -1,4 +1,4 @@
#include "config-host.h"
#include "qemu/osdep.h"
#include "qemu/module.h"

void qemu_module_dummy(void)
Expand Down
2 changes: 1 addition & 1 deletion monitor.c
Expand Up @@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <dirent.h>
#include "hw/hw.h"
#include "monitor/qdev.h"
Expand Down Expand Up @@ -59,7 +60,6 @@
#include "qapi/qmp/json-streamer.h"
#include "qapi/qmp/json-parser.h"
#include <qom/object_interfaces.h>
#include "qemu/osdep.h"
#include "cpu.h"
#include "trace.h"
#include "trace/control.h"
Expand Down
1 change: 1 addition & 0 deletions nbd/client.c
Expand Up @@ -16,6 +16,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#include "qemu/osdep.h"
#include "nbd-internal.h"

static int nbd_errno_to_system_errno(int err)
Expand Down
1 change: 1 addition & 0 deletions nbd/common.c
Expand Up @@ -16,6 +16,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#include "qemu/osdep.h"
#include "nbd-internal.h"

ssize_t nbd_wr_sync(int fd, void *buffer, size_t size, bool do_read)
Expand Down
1 change: 1 addition & 0 deletions nbd/server.c
Expand Up @@ -16,6 +16,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#include "qemu/osdep.h"
#include "nbd-internal.h"

static int system_errno_to_nbd_errno(int err)
Expand Down
1 change: 1 addition & 0 deletions numa.c
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "sysemu/numa.h"
#include "exec/cpu-common.h"
#include "qemu/bitmap.h"
Expand Down
6 changes: 1 addition & 5 deletions os-posix.c
Expand Up @@ -23,10 +23,7 @@
* THE SOFTWARE.
*/

#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include "qemu/osdep.h"
#include <sys/wait.h>
/*needed for MAP_POPULATE before including qemu-options.h */
#include <sys/mman.h>
Expand All @@ -35,7 +32,6 @@
#include <libgen.h>

/* Needed early for CONFIG_BSD etc. */
#include "config-host.h"
#include "sysemu/sysemu.h"
#include "net/slirp.h"
#include "qemu-options.h"
Expand Down
7 changes: 1 addition & 6 deletions os-win32.c
Expand Up @@ -22,14 +22,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <windows.h>
#include <mmsystem.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#include <sys/time.h>
#include "config-host.h"
#include "sysemu/sysemu.h"
#include "qemu-options.h"

Expand Down

0 comments on commit d38ea87

Please sign in to comment.