summaryrefslogtreecommitdiff
path: root/include/libmtd.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@intel.com>2011-11-18 23:53:11 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@intel.com>2011-11-18 23:53:11 +0200
commitf8aa6922dde02835ba97e84be41f387cdd38ec7d (patch)
tree171914942c226c733a9781cd8b0ca4ebeba3233d /include/libmtd.h
parent97bb4aa681f4df5e784c1f8a8db049a95a0d65c6 (diff)
parent0970bf408707d610e88abb069b123e267aeb42f8 (diff)
Merge branch 'brian'v1.4.7
Diffstat (limited to 'include/libmtd.h')
-rw-r--r--include/libmtd.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/libmtd.h b/include/libmtd.h
index 9efccbc..07c304a 100644
--- a/include/libmtd.h
+++ b/include/libmtd.h
@@ -255,19 +255,26 @@ int mtd_read(const struct mtd_dev_info *mtd, int fd, int eb, int offs,
/**
* mtd_write - write data to an MTD device.
+ * @desc: MTD library descriptor
* @mtd: MTD device description object
* @fd: MTD device node file descriptor
* @eb: eraseblock to write to
* @offs: offset withing the eraseblock to write to
- * @buf: buffer to write
- * @len: how many bytes to write
+ * @data: data buffer to write
+ * @len: how many data bytes to write
+ * @oob: OOB buffer to write
+ * @ooblen: how many OOB bytes to write
+ * @mode: write mode (e.g., %MTD_OOB_PLACE, %MTD_OOB_RAW)
*
* This function writes @len bytes of data to eraseblock @eb and offset @offs
* of the MTD device defined by @mtd. Returns %0 in case of success and %-1 in
* case of failure.
+ *
+ * Can only write to a single page at a time if writing to OOB.
*/
-int mtd_write(const struct mtd_dev_info *mtd, int fd, int eb, int offs,
- void *buf, int len);
+int mtd_write(libmtd_t desc, const struct mtd_dev_info *mtd, int fd, int eb,
+ int offs, void *data, int len, void *oob, int ooblen,
+ uint8_t mode);
/**
* mtd_read_oob - read out-of-band area.