aboutsummaryrefslogtreecommitdiffstats
path: root/package/nvram/src/nvram.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-07-19 22:20:07 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-07-19 22:20:07 +0000
commitf813a693fd5e07c60c042a0b11ae8e15144fc960 (patch)
treea1dae749b3ad33263d56c889d557fac19235886b /package/nvram/src/nvram.h
parentc811398d00f0b23a9daef2b5f422785233880f34 (diff)
downloadupstream-f813a693fd5e07c60c042a0b11ae8e15144fc960.tar.gz
upstream-f813a693fd5e07c60c042a0b11ae8e15144fc960.tar.bz2
upstream-f813a693fd5e07c60c042a0b11ae8e15144fc960.zip
nvram: handle nvram at varying offsets within the eraseblock (fixes Edimax PS-1208mfg with FLSH at offset 0)
SVN-Revision: 22299
Diffstat (limited to 'package/nvram/src/nvram.h')
-rw-r--r--package/nvram/src/nvram.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/nvram/src/nvram.h b/package/nvram/src/nvram.h
index e3d64613d4..c72f67e9a8 100644
--- a/package/nvram/src/nvram.h
+++ b/package/nvram/src/nvram.h
@@ -46,7 +46,8 @@ struct nvram_tuple {
struct nvram_handle {
int fd;
char *mmap;
- unsigned long length;
+ unsigned int length;
+ unsigned int offset;
struct nvram_tuple *nvram_hash[257];
struct nvram_tuple *nvram_dead;
};
@@ -113,7 +114,6 @@ char * nvram_find_staging(void);
/* NVRAM constants */
#define NVRAM_SPACE 0x8000
-#define NVRAM_START(x) x - NVRAM_SPACE
#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */
#define NVRAM_VERSION 1