From 3ec498778b26134f82bca32c0dc0a71befc48f29 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 20 Apr 2009 14:46:33 +0300 Subject: libmtd: rename mtd_info Rename 'struct mtd_info' to 'struct mtd_dev_info' to reflect the fact that it provides information about a specific MTD device. Also, this is more consistent with libubi. Signed-off-by: Artem Bityutskiy --- ubi-utils/include/libmtd.h | 20 ++++++++++---------- ubi-utils/include/libscan.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'ubi-utils/include') diff --git a/ubi-utils/include/libmtd.h b/ubi-utils/include/libmtd.h index f2f4da2..bcc2de2 100644 --- a/ubi-utils/include/libmtd.h +++ b/ubi-utils/include/libmtd.h @@ -28,7 +28,7 @@ extern "C" { #endif /** - * struct mtd_info - information about an MTD device. + * struct mtd_dev_info - information about an MTD device. * @num: MTD device number * @major: major number of corresponding character device * @minor: minor number of corresponding character device @@ -42,7 +42,7 @@ extern "C" { * @rdonly: non-zero if the device is read-only * @allows_bb: non-zero if the MTD device may have bad eraseblocks */ -struct mtd_info +struct mtd_dev_info { int num; int major; @@ -67,7 +67,7 @@ struct mtd_info * node file and saves this information in the @mtd object. Returns %0 in case * of success and %-1 in case of failure. */ -int mtd_get_dev_info(const char *node, struct mtd_info *mtd); +int mtd_get_dev_info(const char *node, struct mtd_dev_info *mtd); /** * mtd_erase - erase an eraseblock. @@ -78,7 +78,7 @@ int mtd_get_dev_info(const char *node, struct mtd_info *mtd); * This function erases eraseblock @eb of MTD device decribed by @fd. Returns * %0 in case of success and %-1 in case of failure. */ -int mtd_erase(const struct mtd_info *mtd, int fd, int eb); +int mtd_erase(const struct mtd_dev_info *mtd, int fd, int eb); /** * mtd_is_bad - check if eraseblock is bad. @@ -89,7 +89,7 @@ int mtd_erase(const struct mtd_info *mtd, int fd, int eb); * This function checks if eraseblock @eb is bad. Returns %0 if not, %1 if yes, * and %-1 in case of failure. */ -int mtd_is_bad(const struct mtd_info *mtd, int fd, int eb); +int mtd_is_bad(const struct mtd_dev_info *mtd, int fd, int eb); /** * mtd_mark_bad - marks the block as bad. @@ -100,7 +100,7 @@ int mtd_is_bad(const struct mtd_info *mtd, int fd, int eb); * This function marks the eraseblock @eb as bad. Returns %0 if success * %-1 if failure */ -int mtd_mark_bad(const struct mtd_info *mtd, int fd, int eb); +int mtd_mark_bad(const struct mtd_dev_info *mtd, int fd, int eb); /** * mtd_read - read data from an MTD device. @@ -115,8 +115,8 @@ int mtd_mark_bad(const struct mtd_info *mtd, int fd, int eb); * of the MTD device defined by @mtd and stores the read data at buffer @buf. * Returns %0 in case of success and %-1 in case of failure. */ -int mtd_read(const struct mtd_info *mtd, int fd, int eb, int offs, void *buf, - int len); +int mtd_read(const struct mtd_dev_info *mtd, int fd, int eb, int offs, + void *buf, int len); /** * mtd_write - write data to an MTD device. @@ -131,8 +131,8 @@ int mtd_read(const struct mtd_info *mtd, int fd, int eb, int offs, void *buf, * of the MTD device defined by @mtd. Returns %0 in case of success and %-1 in * case of failure. */ -int mtd_write(const struct mtd_info *mtd, int fd, int eb, int offs, void *buf, - int len); +int mtd_write(const struct mtd_dev_info *mtd, int fd, int eb, int offs, + void *buf, int len); #ifdef __cplusplus } diff --git a/ubi-utils/include/libscan.h b/ubi-utils/include/libscan.h index 8597b98..3ba291f 100644 --- a/ubi-utils/include/libscan.h +++ b/ubi-utils/include/libscan.h @@ -87,7 +87,7 @@ struct ubi_scan_info int data_offs; }; -struct mtd_info; +struct mtd_dev_info; /** * ubi_scan - scan an MTD device. @@ -97,7 +97,7 @@ struct mtd_info; * @verbose: verbose mode: %0 - be silent, %1 - output progress information, * 2 - debugging output mode */ -int ubi_scan(struct mtd_info *mtd, int fd, struct ubi_scan_info **info, +int ubi_scan(struct mtd_dev_info *mtd, int fd, struct ubi_scan_info **info, int verbose); /** -- cgit v1.2.3