summaryrefslogtreecommitdiff
path: root/include/libmtd.h
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2012-01-27 10:30:45 -0800
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-02 13:23:39 +0200
commitde3f8789d9e54b2e0e45197a693ad87ebf3bab60 (patch)
tree7a39b15d5e6d3dfdcfce5ac8a28bf847358c7d3f /include/libmtd.h
parentfb3281d740b4d222746e5e366732d414038c951e (diff)
libmtd: add `mtd_dev_present()' library function
Will be used for `mtdinfo --all' Artem: add a temporary stub for pre-2.6.30 kernels. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'include/libmtd.h')
-rw-r--r--include/libmtd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/libmtd.h b/include/libmtd.h
index 07c304a..a78c8cb 100644
--- a/include/libmtd.h
+++ b/include/libmtd.h
@@ -106,6 +106,15 @@ libmtd_t libmtd_open(void);
void libmtd_close(libmtd_t desc);
/**
+ * mtd_dev_present - check whether a MTD device is present.
+ * @desc: MTD library descriptor
+ * @mtd_num: MTD device number to check
+ *
+ * This function returns %1 if MTD device is present and %0 if not.
+ */
+int mtd_dev_present(libmtd_t desc, int mtd_num);
+
+/**
* mtd_get_info - get general MTD information.
* @desc: MTD library descriptor
* @info: the MTD device information is returned here