From patchwork Mon Dec 31 11:30:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 208840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4FB732C00A8 for ; Mon, 31 Dec 2012 22:30:55 +1100 (EST) Received: from localhost ([::1]:45814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tpda1-0005jv-Qx for incoming@patchwork.ozlabs.org; Mon, 31 Dec 2012 06:30:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpdZs-0005jm-Q8 for qemu-devel@nongnu.org; Mon, 31 Dec 2012 06:30:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TpdZr-0003sm-F7 for qemu-devel@nongnu.org; Mon, 31 Dec 2012 06:30:44 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:51807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpdZr-0003rd-87 for qemu-devel@nongnu.org; Mon, 31 Dec 2012 06:30:43 -0500 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 0AB87A27E8; Mon, 31 Dec 2012 15:30:34 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id ED81D2CB; Mon, 31 Dec 2012 15:30:31 +0400 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 31 Dec 2012 15:30:31 +0400 Message-Id: <1356953431-14078-1-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: Blue Swirl , Michael Tokarev Subject: [Qemu-devel] [PATCH] savevm.c: cleanup system includes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org savevm.c suffers from the same problem as some other files. Some years ago savevm.c was created from vl.c, moving some code from there into a separate file. At that time, all includes were just copied from vl.c to savevm.c, without checking which ones are needed and which are not. But actually most of that stuff is _not_ needed. More, some stuff is wrong, for example, *BSD #ifdef'ery around vs - for one, it fails to build on Debian/kFreebsd. Just remove all this. Maybe there's a possibility to clean it up further - like removing (and maybe including winsock.h for htons etc), and maybe it's possible to remove some internal #includes too, but I didn't check this. While at it, remove duplicate #include of qemu/timer.h. Signed-off-by: Michael Tokarev --- savevm.c | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/savevm.c b/savevm.c index bcdb92e..529d60e 100644 --- a/savevm.c +++ b/savevm.c @@ -21,52 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include - -/* Needed early for CONFIG_BSD etc. */ + #include "config-host.h" #ifndef _WIN32 -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#ifdef CONFIG_BSD -#include -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -#include -#else -#include -#endif -#ifdef __linux__ -#include -#include -#include -#endif -#endif #endif #ifdef _WIN32 #include -#include -#include -#include -#define getopt_long_only getopt_long -#define memalign(align, size) malloc(size) #endif #include "qemu-common.h" @@ -80,7 +43,6 @@ #include "migration/migration.h" #include "qemu/sockets.h" #include "qemu/queue.h" -#include "qemu/timer.h" #include "sysemu/cpus.h" #include "exec/memory.h" #include "qmp-commands.h"