ar71xx: mikrotik: prepend "RouterBOARD" to machine name for NOR devices
authorThibaut VARENE <hacks@slashdirt.org>
Mon, 13 Mar 2017 13:51:54 +0000 (14:51 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Wed, 15 Mar 2017 22:00:52 +0000 (23:00 +0100)
commite1f3cf7ede923312a09fd37195b059a31072cd52
tree24b23be6df0642e89ff6ea8458f8bf0bd481e949
parente3dc036cbf53bb4c2538b619f986cc3cd2aabc87
ar71xx: mikrotik: prepend "RouterBOARD" to machine name for NOR devices

When the device name doesn't already contain "RouterBOARD", this patch adds
this string to the machine name.

Most NOR devices already have "RouterBOARD" in their hardware-stored device name,
but not all of them.

This patch also makes the code more robust against buffer overflows.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c