From patchwork Thu Dec 17 18:22:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 558550 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 1752E1402CD for ; Fri, 18 Dec 2015 05:24:55 +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=spOR/YV5; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D4C8E28C106; Thu, 17 Dec 2015 19:22:31 +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 0CC2F2805AA for ; Thu, 17 Dec 2015 19:22:06 +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-f43.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 17 Dec 2015 19:22:05 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id l126so33464181wml.0 for ; Thu, 17 Dec 2015 10:22:21 -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=TUUqwHjnzVEvOiSjmcHl6e6BfICb/eNURoojiF4jQr8=; b=spOR/YV56t23Nyx0npueYf1xwQbKTZgbwI/3ndT5IVEbgXQR8y8ewv+Akh5g5EhH+8 1t8aJJpfx7Ur4m+duaVnvl/LMyMRC5ZUevBVGJgqVlcdrNUVzltzqAI6y4XZoweCDjAJ xD5Muz3ghJwaiKs/AoRvbrPQ3bpu7OXezslEdn3eJe5Pd47kjF1eKhlC+DMmjCRKYq2s tMBGYqxe0EJ7DZeGz65UGw9frZEPJ0gv/DA69HFe2ZRJC9ZsnvprdGUTPwqjrhDsnxNE lRuoB+0QcFZgz+1uj6dvh5h8huZAmgUwUmR864OgzO9Hbl+qf9kOoT6htesYZTkDMYpa 2UXg== X-Received: by 10.194.119.232 with SMTP id kx8mr25596730wjb.94.1450376540955; Thu, 17 Dec 2015 10:22:20 -0800 (PST) Received: from debian64 (p5B2E6DEE.dip0.t-ipconnect.de. [91.46.109.238]) by smtp.googlemail.com with ESMTPSA id 143sm3374200wmv.18.2015.12.17.10.22.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Dec 2015 10:22:20 -0800 (PST) Received: from chuck by debian64 with local (Exim 4.86) (envelope-from ) id 1a9dBy-0002yw-Hu; Thu, 17 Dec 2015 19:22:18 +0100 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Date: Thu, 17 Dec 2015 19:22:07 +0100 Message-Id: <094c0985ab22d5a322dcb0556886cee46b7b1cbf.1450375672.git.chunkeey@googlemail.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: References: In-Reply-To: References: Subject: [OpenWrt-Devel] [PATCH v8 3/3] 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() {