From cd42aea270e84884e6bbac845414568f0febbedf Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Wed, 31 Aug 2011 13:00:33 -0700 Subject: libmtd: modify `mtd_write' to cover OOB writes To support the MEMWRITE ioctl, we will need a different sort of libmtd interface for writing to flash. We will expand mtd_write to include more functionality; for now, we just change the function definition and description as we begin to add the actual functionality. Signed-off-by: Brian Norris Signed-off-by: Artem Bityutskiy --- nandwrite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nandwrite.c') diff --git a/nandwrite.c b/nandwrite.c index 3eea6e2..33a3b8f 100644 --- a/nandwrite.c +++ b/nandwrite.c @@ -543,8 +543,8 @@ int main(int argc, char * const argv[]) } /* Write out the Page data */ - if (!onlyoob && mtd_write(&mtd, fd, mtdoffset / mtd.eb_size, mtdoffset % mtd.eb_size, - writebuf, mtd.min_io_size)) { + if (!onlyoob && mtd_write(mtd_desc, &mtd, fd, mtdoffset / mtd.eb_size, mtdoffset % mtd.eb_size, + writebuf, mtd.min_io_size, NULL, 0, 0)) { int i; if (errno != EIO) { sys_errmsg("%s: MTD write failure", mtd_device); -- cgit v1.2.3