summaryrefslogtreecommitdiff
path: root/ubi-utils/include
diff options
context:
space:
mode:
authorRichard Genoud <richard.genoud@gmail.com>2012-08-22 18:04:34 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-08-23 11:31:36 +0300
commit24c95043a1fd464388563f31b5f40831f74e04b3 (patch)
tree24c5f9df7277a9d175c42183af7c95bcd82ab5bb /ubi-utils/include
parentdd6898d9ecb210e5187b95adb54a94ab12b9bd2b (diff)
libubi: factorize ubi_attach and ubi_attach_mtd code
The req->mtd_num value is now updated with the MTD device number found by mtd_node_to_num. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'ubi-utils/include')
-rw-r--r--ubi-utils/include/libubi.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/ubi-utils/include/libubi.h b/ubi-utils/include/libubi.h
index 11a186b..bbaa78c 100644
--- a/ubi-utils/include/libubi.h
+++ b/ubi-utils/include/libubi.h
@@ -233,8 +233,9 @@ int ubi_attach_mtd(libubi_t desc, const char *node,
* device node. Otherwise functionality is similar than in function
* 'ubi_attach_mtd()' where @req->mtd_num is used.
*
- * Returns %0 in case of success and %-1 in case of failure (errno is set). The
- * newly created UBI device number is returned in @req->dev_num.
+ * Returns %0 in case of success and %-1 in case of failure (errno is set).
+ * The newly created UBI device number is returned in @req->dev_num.
+ * The MTD device number is returned in @req->mtd_num (-1 if not found)
*/
int ubi_attach(libubi_t desc, const char *node,
struct ubi_attach_request *req);