summaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-08-31 13:00:33 -0700
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 16:11:41 +0300
commitcd42aea270e84884e6bbac845414568f0febbedf (patch)
tree2e63892402be133063ec4a7624862752e163dce8 /ubi-utils
parente413d17f8bd6c680a4f792006932a070ce504120 (diff)
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 <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/ubiformat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c
index bfa1730..ed2b8d0 100644
--- a/ubi-utils/ubiformat.c
+++ b/ubi-utils/ubiformat.c
@@ -534,7 +534,8 @@ static int flash_image(libmtd_t libmtd, const struct mtd_dev_info *mtd,
new_len = drop_ffs(mtd, buf, mtd->eb_size);
- err = mtd_write(mtd, args.node_fd, eb, 0, buf, new_len);
+ err = mtd_write(libmtd, mtd, args.node_fd, eb, 0, buf, new_len,
+ NULL, 0, 0);
if (err) {
sys_errmsg("cannot write eraseblock %d", eb);
@@ -637,7 +638,8 @@ static int format(libmtd_t libmtd, const struct mtd_dev_info *mtd,
fflush(stdout);
}
- err = mtd_write(mtd, args.node_fd, eb, 0, hdr, write_size);
+ err = mtd_write(libmtd, mtd, args.node_fd, eb, 0, hdr,
+ write_size, NULL, 0, 0);
if (err) {
if (!args.quiet && !args.verbose)
printf("\n");