From patchwork Fri Dec 11 17:42:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 555850 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5913B1402D6 for ; Sat, 12 Dec 2015 04:48:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b=1HzF6wb8; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4622B289E92; Fri, 11 Dec 2015 18:46:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CDEA628021B for ; Fri, 11 Dec 2015 18:45:02 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .googlemail. - helo: .mail-wm0-f44.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 11 Dec 2015 18:45:02 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id n186so40399607wmn.1 for ; Fri, 11 Dec 2015 09:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=QkE3fHdR5elg35Mw1MAUAt9EJqVbDsM0QaLK2FspgyE=; b=1HzF6wb86aDMWC2q31hCeS9MMTam9DBzweVQZJVbx7XUvlDfNzmbjPTMKEtLwPwuGs AILCLNdEGCMihgOk7G0jEmdj8pehaQIxQXyVDOUp/Q1P6sQD4LiObv37FDoz/TABMihr 5MxKjK33Mm5Lw8POG1StbbTKO6AEYT1qOE5MT9wKyF081AKPgetUGXS+ug42fWBiScDE wABp+iI54pL/4EpNP6fjJabrf6FxVFnvpGqJY6jPMI6YivrCWBlh4J/urTm7kkEtDoMq jtIPBZaXi43s5diEShxHGkRZo4g33M6KzSEJvJ+rbvCSZqLjS9HGKHjf5Pxl3DXGR9yE u8sQ== X-Received: by 10.28.8.74 with SMTP id 71mr542147wmi.98.1449855887441; Fri, 11 Dec 2015 09:44:47 -0800 (PST) Received: from debian64 (p5B2E6714.dip0.t-ipconnect.de. [91.46.103.20]) by smtp.googlemail.com with ESMTPSA id e9sm3184992wjp.18.2015.12.11.09.44.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Dec 2015 09:44:46 -0800 (PST) Received: from chuck by debian64 with local (Exim 4.86) (envelope-from ) id 1a7RkL-0004dD-L5; Fri, 11 Dec 2015 18:44:45 +0100 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Date: Fri, 11 Dec 2015 18:42:37 +0100 Message-Id: X-Mailer: git-send-email 2.6.3 In-Reply-To: References: In-Reply-To: References: Subject: [OpenWrt-Devel] [PATCH v7 5/5] base-files: cleanup mtd_get_mac_binary hexdump X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Chris R Blake Remove usage of dd, as per request from Yousong Zhou. Signed-off-by: Chris R Blake --- package/base-files/files/lib/functions/system.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 03d7127..35f6d10 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -38,7 +38,7 @@ mtd_get_mac_binary() { return fi - dd bs=1 skip=$offset count=6 if=$part 2>/dev/null | hexdump -v -n 6 -e '5/1 "%02x:" 1/1 "%02x"' + hexdump -v -n 6 -s $offset -e '5/1 "%02x:" 1/1 "%02x"' $part 2>/dev/null } mtd_get_mac_binary_ubi() {