ar71xx: another fix to wndr3700_board_detect
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 3 Jan 2016 11:09:45 +0000 (11:09 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 3 Jan 2016 11:09:45 +0000 (11:09 +0000)
commit3e97c59eb758eba965db226a5e9877f1ffdfb480
tree3ac63680673754334bb1e553e7fdaa1f337df106
parent5a33b80e313326c65121b151d2460e14ba4b0883
ar71xx: another fix to wndr3700_board_detect

My last bugfix (r47538) introduced a new bug in wndr3700_board_detect
(again...).

Assigning the result of ar71xx_get_mtd_offset_size_format to the model
variable before stripping of garbage using awk will cause all NUL bytes to
be removed before awk is applied, leading to model strings like
"NETGEAR WNDRMACv2NETGEAR", where a NUL byte after the v2 is supposed to
terminate the string.

Fix by calling ar71xx_get_mtd_offset_size_format twice, once piping to awk
directly.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48075 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/ar71xx/base-files/lib/ar71xx.sh