projects
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5105454
)
OneNAND: Don't write if it exceeds the partition
author
Kyungmin Park
<kyungmin.park@samsung.com>
Tue, 2 Feb 2010 04:44:56 +0000
(13:44 +0900)
committer
Kyungmin Park
<kyungmin.park@samsung.com>
Tue, 2 Feb 2010 04:44:56 +0000
(13:44 +0900)
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
common/cmd_onenand.c
patch
|
blob
|
history
diff --git
a/common/cmd_onenand.c
b/common/cmd_onenand.c
index
8b0741a
..
bf76610
100644
(file)
--- a/
common/cmd_onenand.c
+++ b/
common/cmd_onenand.c
@@
-86,7
+86,6
@@
static int onenand_block_read(loff_t from, ssize_t len,
printk("Bad blocks %d at 0x%x\n",
(u32)(ofs >> this->erase_shift), (u32)ofs);
ofs += blocksize;
- /* FIXME need to check how to handle the 'len' */
len -= blocksize;
continue;
}
@@
-146,6
+145,7
@@
static int onenand_block_write(loff_t to, ssize_t len,
printk("Bad blocks %d at 0x%x\n",
(u32)(ofs >> this->erase_shift), (u32)ofs);
skip_ofs += blocksize;
+ len -= blocksize;
goto next;
}