summaryrefslogtreecommitdiff
path: root/ubi-utils/src/libmtd.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-04-20 14:46:33 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-04-20 16:29:43 +0300
commit3ec498778b26134f82bca32c0dc0a71befc48f29 (patch)
tree4a541c843c1ed7e5723be964b69c4d8dac1f33f1 /ubi-utils/src/libmtd.c
parentfc85dfd76f97387ccddb46861effa6c386901218 (diff)
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 <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/libmtd.c')
-rw-r--r--ubi-utils/src/libmtd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ubi-utils/src/libmtd.c b/ubi-utils/src/libmtd.c
index 8403c37..dc9287a 100644
--- a/ubi-utils/src/libmtd.c
+++ b/ubi-utils/src/libmtd.c
@@ -33,7 +33,7 @@
#define PROGRAM_NAME "libmtd"
#define MTD_DEV_MAJOR 90
-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)
{
struct stat st;
struct mtd_info_user ui;
@@ -141,7 +141,7 @@ out_close:
return -1;
}
-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)
{
struct erase_info_user ei;
@@ -150,7 +150,7 @@ int mtd_erase(const struct mtd_info *mtd, int fd, int eb)
return ioctl(fd, MEMERASE, &ei);
}
-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)
{
int ret;
loff_t seek;
@@ -173,7 +173,7 @@ int mtd_is_bad(const struct mtd_info *mtd, int fd, int eb)
return ret;
}
-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)
{
int ret;
loff_t seek;
@@ -198,8 +198,8 @@ int mtd_mark_bad(const struct mtd_info *mtd, int fd, int eb)
return 0;
}
-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)
{
int ret, rd = 0;
off_t seek;
@@ -234,8 +234,8 @@ int mtd_read(const struct mtd_info *mtd, int fd, int eb, int offs, void *buf,
return 0;
}
-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)
{
int ret;
off_t seek;