diff mbox

[OpenWrt-Devel,v9,3/3] base-files: cleanup mtd_get_mac_binary hexdump

Message ID 5348a90b77a0ba5237e679597aa41e97dc36b219.1450459377.git.chunkeey@googlemail.com
State Accepted
Headers show

Commit Message

Christian Lamparter Dec. 18, 2015, 5:29 p.m. UTC
From: Chris R Blake <chrisrblake93@gmail.com>

Remove usage of dd, as per request from Yousong Zhou.
<https://lists.openwrt.org/pipermail/openwrt-devel/2015-December/037743.html>

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>
---
 package/base-files/files/lib/functions/system.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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() {