From patchwork Wed Oct 14 20:07:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 530363 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4330E140E43 for ; Thu, 15 Oct 2015 07:14:49 +1100 (AEDT) Received: from localhost ([::1]:44370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmSRj-0004Kr-DV for incoming@patchwork.ozlabs.org; Wed, 14 Oct 2015 16:14:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmSLo-0006CJ-UY for qemu-devel@nongnu.org; Wed, 14 Oct 2015 16:08:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmSLl-000853-NQ for qemu-devel@nongnu.org; Wed, 14 Oct 2015 16:08:40 -0400 Received: from e17.ny.us.ibm.com ([129.33.205.207]:50576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmSLl-00084l-Iw for qemu-devel@nongnu.org; Wed, 14 Oct 2015 16:08:37 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Oct 2015 16:08:37 -0400 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Oct 2015 16:08:35 -0400 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: mdroth@linux.vnet.ibm.com X-IBM-RcptTo: qemu-devel@nongnu.org Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 4BFC8C90048 for ; Wed, 14 Oct 2015 15:56:46 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t9EK8YAn33816698 for ; Wed, 14 Oct 2015 20:08:34 GMT Received: from d01av04.pok.ibm.com (localhost [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t9EK8YLe032324 for ; Wed, 14 Oct 2015 16:08:34 -0400 Received: from localhost ([9.80.86.12]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t9EK8XZn032285; Wed, 14 Oct 2015 16:08:34 -0400 From: Michael Roth To: qemu-devel@nongnu.org Date: Wed, 14 Oct 2015 15:07:57 -0500 Message-Id: <1444853285-10643-5-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444853285-10643-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1444853285-10643-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15101420-0041-0000-0000-000001E842E6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 129.33.205.207 Cc: peter.maydell@linaro.org, Michael Roth , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [Qemu-devel] [PATCH 04/12] qga: do not override configuration verbosity 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 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();