| Submitter | vimal singh |
|---|---|
| Date | Dec. 2, 2009, 2:33 p.m. |
| Message ID | <ce9ab5790912020633o24dbab61le9ab2d14e0b5177e@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/40052/ |
| State | New |
| Headers | show |
Comments
Patch
--- a/flash_lock.c 2009-11-24 19:33:18.000000000 +0530 +++ b/flash_lock.c 2009-11-24 19:33:13.000000000 +0530 @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) } mtdLockInfo.start = ofs; - mtdLockInfo.length = num_sectors * mtdInfo.erasesize; + mtdLockInfo.length = (num_sectors - 1) * mtdInfo.erasesize; if(ioctl(fd, MEMLOCK, &mtdLockInfo)) { fprintf(stderr, "Could not lock MTD device: %s\n", argv[1]); @@ -81,4 +81,3 @@ int main(int argc, char *argv[]) return 0; } -