aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/nvram/src/nvram.c
Commit message (Collapse)AuthorAgeFilesLines
* nvram: get rid of NVRAM_SPACERafał Miłecki2015-07-081-2/+2
| | | | | | | | Now we support NVRAM whatever its size is. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46262 3c298f89-4303-0410-b956-a3cf2f4a3e73
* nvram: fix "Segmentation fault" caused by setting memory out of bufferRafał Miłecki2015-07-071-2/+2
| | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46251 3c298f89-4303-0410-b956-a3cf2f4a3e73
* nvram: fix regression in finding NVRAM beginningRafał Miłecki2015-04-241-1/+6
| | | | | | | | | The loop was giving up too early as it never expected NVRAM smaller than 0x10000. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45578 3c298f89-4303-0410-b956-a3cf2f4a3e73
* nvram: refuse to open NVRAM for writing if it's too big to be handledRafał Miłecki2015-04-221-2/+2
| | | | | | | | Otherwise writing anything will result in loosing data. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45565 3c298f89-4303-0410-b956-a3cf2f4a3e73
* nvram: drop check for WGT634U using /proc/diag/modelRafał Miłecki2015-04-221-11/+1
| | | | | | | | | We don't have broadcom-diag for months or years now and the correct solution is to simply don't have "nvram" partition on WGT634U anyway. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45564 3c298f89-4303-0410-b956-a3cf2f4a3e73
* nvram: use correct variable name for MTD partition sizeRafał Miłecki2015-04-221-13/+14
| | | | | | | | | | Sytax of /proc/mtd is following: dev: size erasesize name which means that sscanf "mtd%d: %08x" reads size, not erasesize. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45563 3c298f89-4303-0410-b956-a3cf2f4a3e73
* nvram: drop support for ancient /dev/mtdblock/%dRafał Miłecki2015-04-221-13/+1
| | | | | | | | Path /dev/mtdblock%d is used for years now. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45562 3c298f89-4303-0410-b956-a3cf2f4a3e73
* packages: clean up the package folderJohn Crispin2013-06-211-0/+556
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37007 3c298f89-4303-0410-b956-a3cf2f4a3e73