From a6c9aa1f92dd16a0ec6faeff37069db61d3f7cf3 Mon Sep 17 00:00:00 2001 From: Ben Gardiner Date: Tue, 24 May 2011 10:18:35 -0400 Subject: nand_util: convert nand_write_skip_bad() to flags In a future commit the behaviour of nand_write_skip_bad() will be further extended. Convert the only flag currently passed to the nand_write_ skip_bad() function to a bitfield of only one allocated member. This should avoid an explosion of int's at the end of the parameter list or the ambiguous calls like nand_write_skip_bad(info, offset, len, buf, 0, 1, 1); nand_write_skip_bad(info, offset, len, buf, 0, 1, 0); Instead there will be: nand_write_skip_bad(info, offset, len, buf, WITH_YAFFS_OOB | WITH_OTHER); Signed-off-by: Ben Gardiner Acked-by: Detlev Zundel Signed-off-by: Scott Wood --- common/cmd_nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/cmd_nand.c') diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 44c4d1f89..27a88796e 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -581,7 +581,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) printf("Unknown nand command suffix '%s'.\n", s); return 1; } - ret = nand_write_skip_bad(nand, off, &rwsize, (u_char *)addr, 1); + ret = nand_write_skip_bad(nand, off, &rwsize, + (u_char *)addr, WITH_YAFFS_OOB); #endif } else if (!strcmp(s, ".oob")) { /* out-of-band data */ -- cgit v1.2.3-70-g09d2