Skip to content

Commit

Permalink
block: 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 <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
  • Loading branch information
pm215 authored and kevmw committed Jan 20, 2016
1 parent a174da3 commit 80c71a2
Show file tree
Hide file tree
Showing 70 changed files with 70 additions and 34 deletions.
1 change: 1 addition & 0 deletions block/accounting.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "block/accounting.h"
#include "block/block_int.h"
#include "qemu/timer.h"
Expand Down
2 changes: 1 addition & 1 deletion block/archipelago.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/error-report.h"
Expand All @@ -59,7 +60,6 @@
#include "qapi/qmp/qjson.h"
#include "qemu/atomic.h"

#include <inttypes.h>
#include <xseg/xseg.h>
#include <xseg/protocol.h>

Expand Down
4 changes: 1 addition & 3 deletions block/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
*
*/

#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include "qemu/osdep.h"

#include "trace.h"
#include "block/block.h"
Expand Down
1 change: 1 addition & 0 deletions block/blkdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/config-file.h"
#include "block/block_int.h"
Expand Down
2 changes: 1 addition & 1 deletion block/blkverify.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* See the COPYING file in the top-level directory.
*/

#include <stdarg.h>
#include "qemu/osdep.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
#include "block/block_int.h"
#include "qapi/qmp/qdict.h"
Expand Down
1 change: 1 addition & 0 deletions block/block-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* or later. See the COPYING.LIB file in the top-level directory.
*/

#include "qemu/osdep.h"
#include "sysemu/block-backend.h"
#include "block/block_int.h"
#include "block/blockjob.h"
Expand Down
1 change: 1 addition & 0 deletions block/bochs.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions block/cloop.c
Original file line number Diff line number Diff line change
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 "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions block/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
*/

#include "qemu/osdep.h"
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
Expand Down
1 change: 1 addition & 0 deletions block/curl.c
Original file line number Diff line number Diff line change
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 "qemu-common.h"
#include "qemu/error-report.h"
#include "block/block_int.h"
Expand Down
1 change: 1 addition & 0 deletions block/dmg.c
Original file line number Diff line number Diff line change
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 "qemu-common.h"
#include "block/block_int.h"
#include "qemu/bswap.h"
Expand Down
1 change: 1 addition & 0 deletions block/gluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* See the COPYING file in the top-level directory.
*
*/
#include "qemu/osdep.h"
#include <glusterfs/api/glfs.h>
#include "block/block_int.h"
#include "qemu/uri.h"
Expand Down
1 change: 1 addition & 0 deletions block/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "trace.h"
#include "sysemu/block-backend.h"
#include "block/blockjob.h"
Expand Down
2 changes: 1 addition & 1 deletion block/iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* THE SOFTWARE.
*/

#include "config-host.h"
#include "qemu/osdep.h"

#include <poll.h>
#include <math.h>
Expand Down
1 change: 1 addition & 0 deletions block/linux-aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/aio.h"
#include "qemu/queue.h"
Expand Down
1 change: 1 addition & 0 deletions block/mirror.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*
*/

#include "qemu/osdep.h"
#include "trace.h"
#include "block/blockjob.h"
#include "block/block_int.h"
Expand Down
1 change: 1 addition & 0 deletions block/nbd-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "nbd-client.h"
#include "qemu/sockets.h"

Expand Down
3 changes: 1 addition & 2 deletions block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "block/nbd-client.h"
#include "qemu/uri.h"
#include "block/block_int.h"
Expand All @@ -36,8 +37,6 @@
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qstring.h"

#include <sys/types.h>
#include <unistd.h>

#define EN_OPTSTR ":exportname="

Expand Down
2 changes: 1 addition & 1 deletion block/nfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/

#include "config-host.h"
#include "qemu/osdep.h"

#include <poll.h>
#include "qemu-common.h"
Expand Down
1 change: 1 addition & 0 deletions block/null.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* See the COPYING file in the top-level directory.
*/

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

#define NULL_OPT_LATENCY "latency-ns"
Expand Down
1 change: 1 addition & 0 deletions block/parallels.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions block/qapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "block/qapi.h"
#include "block/block_int.h"
#include "block/throttle-groups.h"
Expand Down
1 change: 1 addition & 0 deletions block/qcow.c
Original file line number Diff line number Diff line change
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 "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
3 changes: 1 addition & 2 deletions block/qcow2-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
*/

/* Needed for CONFIG_MADVISE */
#include "config-host.h"
#include "qemu/osdep.h"

#if defined(CONFIG_MADVISE) || defined(CONFIG_POSIX_MADVISE)
#include <sys/mman.h>
#endif

#include "block/block_int.h"
#include "qemu-common.h"
#include "qemu/osdep.h"
#include "qcow2.h"
#include "trace.h"

Expand Down
1 change: 1 addition & 0 deletions block/qcow2-cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

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

#include "qemu-common.h"
Expand Down
1 change: 1 addition & 0 deletions block/qcow2-refcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
Expand Down
1 change: 1 addition & 0 deletions block/qcow2-snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
Expand Down
1 change: 1 addition & 0 deletions block/qcow2.c
Original file line number Diff line number Diff line change
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 "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions block/qed-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*
*/

#include "qemu/osdep.h"
#include "qed.h"

typedef struct {
Expand Down
1 change: 1 addition & 0 deletions block/qed-cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
*/

#include "qemu/osdep.h"
#include "qed.h"

/**
Expand Down
1 change: 1 addition & 0 deletions block/qed-gencb.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*
*/

#include "qemu/osdep.h"
#include "qed.h"

void *gencb_alloc(size_t len, BlockCompletionFunc *cb, void *opaque)
Expand Down
1 change: 1 addition & 0 deletions block/qed-l2-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
* table will be deleted in favor of the existing cache entry.
*/

#include "qemu/osdep.h"
#include "trace.h"
#include "qed.h"

Expand Down
1 change: 1 addition & 0 deletions block/qed-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
*/

#include "qemu/osdep.h"
#include "trace.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
#include "qed.h"
Expand Down
1 change: 1 addition & 0 deletions block/qed.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
*/

#include "qemu/osdep.h"
#include "qemu/timer.h"
#include "trace.h"
#include "qed.h"
Expand Down
1 change: 1 addition & 0 deletions block/quorum.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the COPYING file in the top-level directory.
*/

#include "qemu/osdep.h"
#include "block/block_int.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qdict.h"
Expand Down
3 changes: 1 addition & 2 deletions block/raw-posix.c
Original file line number Diff line number Diff line change
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 "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
Expand Down Expand Up @@ -51,8 +52,6 @@
#include <sys/dkio.h>
#endif
#ifdef __linux__
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <linux/cdrom.h>
Expand Down
1 change: 1 addition & 0 deletions block/raw-win32.c
Original file line number Diff line number Diff line change
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 "qemu-common.h"
#include "qemu/timer.h"
#include "block/block_int.h"
Expand Down
1 change: 1 addition & 0 deletions block/raw_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* IN THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "block/block_int.h"
#include "qemu/option.h"

Expand Down
2 changes: 1 addition & 1 deletion block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/

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

#include "qemu-common.h"
#include "qemu/error-report.h"
Expand Down
1 change: 1 addition & 0 deletions block/sheepdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/uri.h"
#include "qemu/error-report.h"
Expand Down
1 change: 1 addition & 0 deletions block/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include "block/snapshot.h"
#include "block/block_int.h"
#include "qapi/qmp/qerror.h"
Expand Down
4 changes: 1 addition & 3 deletions block/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
* THE SOFTWARE.
*/

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "qemu/osdep.h"

#include <libssh2.h>
#include <libssh2_sftp.h>
Expand Down
1 change: 1 addition & 0 deletions block/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*
*/

#include "qemu/osdep.h"
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
Expand Down
1 change: 1 addition & 0 deletions block/throttle-groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#include "qemu/osdep.h"
#include "block/throttle-groups.h"
#include "qemu/queue.h"
#include "qemu/thread.h"
Expand Down
Loading

0 comments on commit 80c71a2

Please sign in to comment.