Received: from eggs.gnu.org ([2001:4830:134:3::10]:47428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaTSN-0003xM-Ky for qemu-devel@nongnu.org; Fri, 11 Sep 2015 14:53:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaTSM-0007Cx-RF for qemu-devel@nongnu.org; Fri, 11 Sep 2015 14:53:55 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:36606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaTSM-0007CC-Mu for qemu-devel@nongnu.org; Fri, 11 Sep 2015 14:53:54 -0400 Received: by qkcf65 with SMTP id f65so35844302qkc.3 for ; Fri, 11 Sep 2015 11:53:54 -0700 (PDT) Sender: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= From: marcandre.lureau@redhat.com Date: Fri, 11 Sep 2015 20:53:39 +0200 Message-Id: <1441997621-3284-3-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1441997621-3284-1-git-send-email-marcandre.lureau@redhat.com> References: <1441997621-3284-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v2 2/4] qga: do not override configuration verbosity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , mdroth@linux.vnet.ibm.com 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 --- 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(); -- 2.4.3