From patchwork Wed Feb 17 14:50:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 62115 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp44989lbl; Wed, 17 Feb 2016 06:54:46 -0800 (PST) X-Received: by 10.140.154.144 with SMTP id a138mr2454181qha.92.1455720886641; Wed, 17 Feb 2016 06:54:46 -0800 (PST) Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com. [209.132.183.37]) by mx.google.com with ESMTPS id t29si1596204qki.38.2016.02.17.06.54.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Feb 2016 06:54:46 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1HEos2o029348; Wed, 17 Feb 2016 09:50:55 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u1HEor56002428 for ; Wed, 17 Feb 2016 09:50:53 -0500 Received: from colepc.redhat.com (ovpn-113-23.phx2.redhat.com [10.3.113.23]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1HEoqFX031813; Wed, 17 Feb 2016 09:50:53 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 17 Feb 2016 09:50:45 -0500 Message-Id: <1d7d8ad5c55b1a7d92d23cbcf133b5104272caa6.1455720579.git.crobinso@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Move PORT definitions to qemu_conf.c X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com Which is the only user. That was the only reason for including qemu_command.h, though we need to explicitly include qemu_domain.h afterwards. --- Had this sitting in a branch. jferlan: this is in your neck of the woods, not sure if it's going to conflict with any of your reorg patches though... src/qemu/qemu_command.h | 16 ---------------- src/qemu/qemu_conf.c | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 17 deletions(-) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 776954e..fb684d0 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -39,22 +39,6 @@ # define QEMU_DRIVE_HOST_PREFIX "drive-" # define QEMU_FSDEV_HOST_PREFIX "fsdev-" -/* These are only defaults, they can be changed now in qemu.conf and - * explicitly specified port is checked against these two (makes - * sense to limit the values). - * - * This limitation is mentioned in qemu.conf, so bear in mind that the - * configuration file should reflect any changes made to these values. - */ -# define QEMU_REMOTE_PORT_MIN 5900 -# define QEMU_REMOTE_PORT_MAX 65535 - -# define QEMU_WEBSOCKET_PORT_MIN 5700 -# define QEMU_WEBSOCKET_PORT_MAX 65535 - -# define QEMU_MIGRATION_PORT_MIN 49152 -# define QEMU_MIGRATION_PORT_MAX 49215 - VIR_ENUM_DECL(qemuVideo) typedef struct _qemuBuildCommandLineCallbacks qemuBuildCommandLineCallbacks; diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 14683f5..fd3055f 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -36,8 +36,8 @@ #include "virerror.h" #include "qemu_conf.h" -#include "qemu_command.h" #include "qemu_capabilities.h" +#include "qemu_domain.h" #include "viruuid.h" #include "virbuffer.h" #include "virconf.h" @@ -58,6 +58,22 @@ VIR_LOG_INIT("qemu.qemu_conf"); +/* These are only defaults, they can be changed now in qemu.conf and + * explicitly specified port is checked against these two (makes + * sense to limit the values). + * + * This limitation is mentioned in qemu.conf, so bear in mind that the + * configuration file should reflect any changes made to these values. + */ +#define QEMU_REMOTE_PORT_MIN 5900 +#define QEMU_REMOTE_PORT_MAX 65535 + +#define QEMU_WEBSOCKET_PORT_MIN 5700 +#define QEMU_WEBSOCKET_PORT_MAX 65535 + +#define QEMU_MIGRATION_PORT_MIN 49152 +#define QEMU_MIGRATION_PORT_MAX 49215 + static virClassPtr virQEMUDriverConfigClass; static void virQEMUDriverConfigDispose(void *obj);