Rafał Miłecki 1cd7850184 nvram: fix "Segmentation fault" caused by setting memory out of buffer
Some MTD partitions with NVRAM have content starting in the middle. In
such case offset is set and nvram_header returns pointer to the middle.
It means we have to respect offset when calculating remaining space.

By the way use real MTD partition size (nvram_part_size variable) as we
may want to bump NVRAM_SPACE in the (very near) future.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

Backport of r46251

git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@46258 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-07-08 04:55:04 +00:00
..
2014-11-03 09:56:44 +00:00
2015-03-29 04:28:29 +00:00
2014-11-03 09:56:44 +00:00
2014-11-03 09:56:44 +00:00
2014-11-03 09:56:44 +00:00
2014-11-03 09:56:44 +00:00
2014-11-03 09:56:44 +00:00
2015-04-01 13:36:58 +00:00
2014-11-03 09:56:44 +00:00
2014-11-03 09:56:44 +00:00
2014-11-03 09:56:44 +00:00