From patchwork Thu Mar 5 12:20:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 45456 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D8B47204BC for ; Thu, 5 Mar 2015 12:20:56 +0000 (UTC) Received: by widfb4 with SMTP id fb4sf12442607wid.2 for ; Thu, 05 Mar 2015 04:20:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=6jHgv6jdnBabSBAnmjUWu+hfstzTny3e9wXDUhwhbUY=; b=ZeuKBYf+9+0g8dEVkqtAhiRB/dkRZSlLb/+5LNpMFaHuJUBWPToGxUJHUY0AFvpFz9 B+RgxOq2f9Id+/f/OmBUPQZaaAMxBPdFy48JN0h6bDbgALhP/Jo4tPbI/pUhU9OP2oOZ MwvgOSoC/tB/5FlTXB6UmzfGvmpt7ZiQYWFgWU4+fxaf3PKLi+SzKtNXKKP46oCJ5Vm8 aMmOVQM1TYD9vGb/d/ppnhhpIhd++1q8F51X9YKqaoWhJoIaObJz15vLKkwfRpaZcrj+ nV+4HDAmw75Q4P4Fqi7hefUsdB69QnsbJIe7zcD8Bz6D7SJYlKvo+49/rZlFKmeSHXsO GW/g== X-Gm-Message-State: ALoCoQm9G8PWTCY7lgXlL9+K45hZpakRJ2HD5JZi1Pm4dIG4+z848oqvT8+JZgB+WvMluECVqk8+ X-Received: by 10.112.199.69 with SMTP id ji5mr1447875lbc.0.1425558056134; Thu, 05 Mar 2015 04:20:56 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.98 with SMTP id m2ls320440lae.5.gmail; Thu, 05 Mar 2015 04:20:55 -0800 (PST) X-Received: by 10.112.12.196 with SMTP id a4mr7737340lbc.8.1425558055847; Thu, 05 Mar 2015 04:20:55 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id wn6si1246760lac.74.2015.03.05.04.20.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 04:20:55 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbvp9 with SMTP id p9so15707098lbv.10 for ; Thu, 05 Mar 2015 04:20:55 -0800 (PST) X-Received: by 10.112.162.232 with SMTP id yd8mr7467927lbb.41.1425558055621; Thu, 05 Mar 2015 04:20:55 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp447134lbj; Thu, 5 Mar 2015 04:20:54 -0800 (PST) X-Received: by 10.140.41.113 with SMTP id y104mr11352015qgy.25.1425558053646; Thu, 05 Mar 2015 04:20:53 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id d79si5867791qhc.7.2015.03.05.04.20.51 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Mar 2015 04:20:53 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YTUlk-0002yS-BU; Thu, 05 Mar 2015 12:20:48 +0000 Received: from mail-wg0-f54.google.com ([74.125.82.54]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YTUlf-0002yN-MS for lng-odp@lists.linaro.org; Thu, 05 Mar 2015 12:20:43 +0000 Received: by wghl18 with SMTP id l18so5742572wgh.5 for ; Thu, 05 Mar 2015 04:20:38 -0800 (PST) X-Received: by 10.194.82.226 with SMTP id l2mr18316406wjy.11.1425558038289; Thu, 05 Mar 2015 04:20:38 -0800 (PST) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::1]) by mx.google.com with ESMTPSA id lb6sm10281394wjb.22.2015.03.05.04.20.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Mar 2015 04:20:37 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Thu, 5 Mar 2015 12:20:28 +0000 Message-Id: <1425558028-18028-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCHv2] linux-generic: only print errors to stderr X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stuart.haslam@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The default logger prints all log levels to stderr. To make things easier when debugging failures change it to print only errors to stderr and everything else to stdout. Signed-off-by: Stuart Haslam Reviewed-by: Taras Kondratiuk --- v2: Fixed indentation (forgot to checkpatch v1) platform/linux-generic/odp_weak.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_weak.c b/platform/linux-generic/odp_weak.c index 7fa5955..145d0b8 100644 --- a/platform/linux-generic/odp_weak.c +++ b/platform/linux-generic/odp_weak.c @@ -14,9 +14,20 @@ int odp_override_log(odp_log_level_e level ODP_UNUSED, const char *fmt, ...) { va_list args; int r; + FILE *logfd; + + switch (level) { + case ODP_LOG_ERR: + case ODP_LOG_UNIMPLEMENTED: + case ODP_LOG_ABORT: + logfd = stderr; + break; + default: + logfd = stdout; + } va_start(args, fmt); - r = vfprintf(stderr, fmt, args); + r = vfprintf(logfd, fmt, args); va_end(args); return r;