ar71xx: another fix to wndr3700_board_detect
authorFelix Fietkau <[email protected]>
Sun, 3 Jan 2016 14:48:17 +0000 (14:48 +0000)
committerFelix Fietkau <[email protected]>
Sun, 3 Jan 2016 14:48:17 +0000 (14:48 +0000)
commit652b53c5f3700beff628632654a9d9b2cd36c505
treeb5f1e9d5a09477c2decd4551c74392bbd5090bad
parent760a71b42d9ab4ecd46ebf0d17ceb40fdc5322a3
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 <[email protected]>
Backport of r48075

SVN-Revision: 48089
target/linux/ar71xx/base-files/lib/ar71xx.sh