| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The value of nvram_tuple_t is allocated in _nvram_realloc,
but it is not freed in _nvram_free.
Signed-off-by: Zhai Zhaoxuan <zhaizhaoxuan@xiaomi.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix memory leak on nvram_open() and nvram_open_rdonly().
For nvram_open(), the 'fd' should be closed on error, and
mmap_area should be unmap when nvram magic can not be found.
For nvram_open_rdonly(), the 'file' variable should free before
return. Once nvram_find_mtd() return successfully, it will allocate
memory to save mtd device string.
Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
|
|
|
|
|
|
|
|
| |
Now we support NVRAM whatever its size is.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 46262
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
SVN-Revision: 46251
|
|
|
|
|
|
|
|
|
| |
The loop was giving up too early as it never expected NVRAM smaller
than 0x10000.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45578
|
|
|
|
|
|
|
|
| |
Otherwise writing anything will result in loosing data.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45565
|
|
|
|
|
|
|
|
|
| |
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>
SVN-Revision: 45564
|
|
|
|
|
|
|
|
|
|
| |
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>
SVN-Revision: 45563
|
|
|
|
|
|
|
|
| |
Path /dev/mtdblock%d is used for years now.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45562
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37007
|