From patchwork Mon Dec 25 23:00:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 852887 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MuWC7SFt"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Xwg8Br/Z"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z5F3L2drPz9ryv for ; Tue, 26 Dec 2017 10:01:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zHupQ3v9gTDOvVOMICV1WrI2coFxVZP8WDvVt7gJ2/s=; b=MuWC7SFtzjGz/l a4ejKq1FGlqcd0b41xSIzg2IayWqv7PTC2yXgcgNg/rZQWOqTsGKa0XJIqGiWOaymB+Gncj0z7McZ m70Q/Ej+rn94fN+/Q8VnbwvjzhgjmRdCYLr+1zD5mvFb2uzgNeohaTSGNaLml0maLYfycpGpkcqc/ fNNguN4cSjXXaCG4DZQ4sO0LppiLZ+z9cq7+Sk9BlVmIjey16q7BVgWShAq7Wu5LwPWPgxWNbmhm4 LAbQo4oHLQaR564JYkQK4cQyUU29p42htiZ2S4i6AOdo52mz0RdPcPfVusQKf+jH0tmhm9ZQNyHKp cDaffkIP0hxU9lMq81fg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eTbju-0001wU-Lr; Mon, 25 Dec 2017 23:00:58 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eTbjq-0001uI-P8 for lede-dev@lists.infradead.org; Mon, 25 Dec 2017 23:00:56 +0000 Received: by mail-pl0-x241.google.com with SMTP id g2so17063738pli.8 for ; Mon, 25 Dec 2017 15:00:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=8O0L4RLYNbv2c3wqwNm6WciVrPTNh81kYqSUCH8sv9o=; b=Xwg8Br/ZsejlPStdAnqB0pJwJpd2wb4vod1GaT+6wxXFltNawxALR2labr9lhQo/4F EtZ7ACPwK1QfMl7eLwq217PCWFR1wjocOhBmOlSSqkDNiI2f/9krkAaCMWCkIoiRk52A 2ttejkk1h2DczNKAw46Yvoef8ezgt2LqNOhEXETf0QQBS5sibY6LenEfQKnBNvsgs9So LtTZlrIz9TSOHs+XV7feSPtJVyi9NXprGl7ld8Ht8vUiHSQOrCCYsZs76EJ6EwP6eA9h HN+erd/vZjK8/tZLTlKyIBxbL/fNldu4X1WuLeZz1oZLlsneg83dH1ONdOKe18os13J+ VN5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8O0L4RLYNbv2c3wqwNm6WciVrPTNh81kYqSUCH8sv9o=; b=bDRSOYFgvvzIkIMLzltQ1OcA44/hfE4UznzjMSLuSRXEWdCgQZ4unocieD90mZ1otV El/8QHW3byJRPejqgOojh61cBSiZG6FtIWEmEKvxZupTQiaPX9SuWfQZckm1V6y1fAzx 9vnDJVz8rQCxBTSqpd4x5CL/LO2YjtSnL7FAcBoUxOgnaVNDUVuO9y0h2HRGERsSOkoX ZMu/WPhHjghFCD6xX5iwHsX5HQP5VJ72/uz+9zxHoLSsKQYMyJdI00S1/nWwWNAM/7MI 34sxzytmUxpVxbf6NRJDyLvjQXgpvM5F1yol4G8o0G3yk6ic0uQgy0bdEnBqrUUH04L6 PNEg== X-Gm-Message-State: AKGB3mL02Wrp/IKUoWaI5ByxMkswoQCqaMZ6RDxcf3LTYagnr8bbcEuz wdeF+7APQCAoPvcMdZtYYC9MdUx1 X-Google-Smtp-Source: ACJfBovFMpuM9UMC2RhRMj4/vSj5iQl9U+jD4zaXWSnknD0otH12EhR+Cj95/SyQ1EJBkBYLmfzapQ== X-Received: by 10.159.233.131 with SMTP id bh3mr23119251plb.97.1514242844004; Mon, 25 Dec 2017 15:00:44 -0800 (PST) Received: from DESKTOP-CEH0M93.lan ([2001:470:1f05:c3e:98da:65ff:24e5:ee50]) by smtp.gmail.com with ESMTPSA id k2sm50967561pff.150.2017.12.25.15.00.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Dec 2017 15:00:43 -0800 (PST) From: Rosen Penev To: lede-dev@lists.infradead.org Date: Mon, 25 Dec 2017 15:00:51 -0800 Message-Id: <1514242852-5554-1-git-send-email-rosenp@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171225_150054_926274_522F5DBE X-CRM114-Status: UNSURE ( 7.56 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c01:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rosenp[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH] libopkg: Replace strerror(errno) with %m X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rosen Penev MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Saves a few bytes. No functional difference. Signed-off-by: Rosen Penev --- libopkg/opkg_conf.c | 2 +- libopkg/opkg_message.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c index 08855eb..e4de374 100644 --- a/libopkg/opkg_conf.c +++ b/libopkg/opkg_conf.c @@ -450,7 +450,7 @@ static int glob_errfunc(const char *epath, int eerrno) /* If leading dir does not exist, we get GLOB_NOMATCH. */ return 0; - opkg_msg(ERROR, "glob failed for %s: %s\n", epath, strerror(eerrno)); + opkg_msg(ERROR, "glob failed for %s: %m\n", epath); return 0; } diff --git a/libopkg/opkg_message.h b/libopkg/opkg_message.h index 4110ab9..441fd2d 100644 --- a/libopkg/opkg_message.h +++ b/libopkg/opkg_message.h @@ -42,6 +42,6 @@ void opkg_message(message_level_t level, const char *fmt, ...) } while (0) #define opkg_perror(l, fmt, args...) \ - opkg_msg(l, fmt": %s.\n", ##args, strerror(errno)) + opkg_msg(l, fmt": %m.\n", ##args) #endif /* _OPKG_MESSAGE_H_ */