summaryrefslogtreecommitdiff
path: root/flash_otp_write.c
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@gmail.com>2006-05-27 10:10:03 -0500
committerJosh Boyer <jwboyer@gmail.com>2006-05-27 10:10:03 -0500
commit69358f79c0523f40001aebb6e43b2401b3a3e070 (patch)
tree4c5b382d02870a6a30a67a75d49ebd916e52ec6d /flash_otp_write.c
parenta96ff574c24dab891c4061d2103815e34aeb78f8 (diff)
parentc712b2344e47101df11f46997508bf96b9f4e24e (diff)
Merge git://git.infradead.org/users/joern/utils
Diffstat (limited to 'flash_otp_write.c')
-rw-r--r--flash_otp_write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/flash_otp_write.c b/flash_otp_write.c
index 71d3168..4cadcdf 100644
--- a/flash_otp_write.c
+++ b/flash_otp_write.c
@@ -59,7 +59,7 @@ int main(int argc,char *argv[])
printf("Writing OTP user data on %s at offset 0x%lx\n", argv[2], offset);
if (mtdInfo.type == MTD_NANDFLASH)
- len = mtdInfo.oobblock;
+ len = mtdInfo.writesize;
else
len = 256;
@@ -73,8 +73,8 @@ int main(int argc,char *argv[])
while (size > 0) {
if (mtdInfo.type == MTD_NANDFLASH) {
/* Fill remain buffers with 0xff */
- memset(buf + size, 0xff, mtdInfo.oobblock - size);
- size = mtdInfo.oobblock;
+ memset(buf + size, 0xff, mtdInfo.writesize - size);
+ size = mtdInfo.writesize;
}
ret = write(fd, p, size);
if (ret < 0) {