From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zml2P-0000JU-2r for qemu-devel@nongnu.org; Thu, 15 Oct 2015 12:05:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zml2J-0000zp-V3 for qemu-devel@nongnu.org; Thu, 15 Oct 2015 12:05:53 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:44981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zml2J-0000zR-0O for qemu-devel@nongnu.org; Thu, 15 Oct 2015 12:05:47 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Oct 2015 10:05:46 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 7653A3E40041 for ; Thu, 15 Oct 2015 10:05:44 -0600 (MDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t9FG4OlL63569946 for ; Thu, 15 Oct 2015 09:04:25 -0700 Received: from d03av01.boulder.ibm.com (localhost [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t9FG5hWr019902 for ; Thu, 15 Oct 2015 10:05:44 -0600 From: Michael Roth Date: Thu, 15 Oct 2015 11:05:10 -0500 Message-Id: <1444925118-10629-5-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1444925118-10629-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1444925118-10629-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 04/12] qga: do not override configuration verbosity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Michael Roth , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-André Lureau Move the default verbosity settings before loading the configuration file, or it will overwrite it. Found thanks to writing qga tests :) Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- qga/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 18e1e1d..aa6a063 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1083,8 +1083,6 @@ static void config_parse(GAConfig *config, int argc, char **argv) { NULL, 0, NULL, 0 } }; - config->log_level = G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL; - while ((ch = getopt_long(argc, argv, sopt, lopt, &opt_ind)) != -1) { switch (ch) { case 'm': @@ -1332,6 +1330,8 @@ int main(int argc, char **argv) GAState *s = g_new0(GAState, 1); GAConfig *config = g_new0(GAConfig, 1); + config->log_level = G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL; + module_call_init(MODULE_INIT_QAPI); init_dfl_pathnames(); -- 1.9.1