summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/include/linux/mtd/ubi.h
diff options
context:
space:
mode:
Diffstat (limited to 'ANDROID_3.4.5/include/linux/mtd/ubi.h')
-rw-r--r--ANDROID_3.4.5/include/linux/mtd/ubi.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/ANDROID_3.4.5/include/linux/mtd/ubi.h b/ANDROID_3.4.5/include/linux/mtd/ubi.h
index db4836be..c2e92b36 100644
--- a/ANDROID_3.4.5/include/linux/mtd/ubi.h
+++ b/ANDROID_3.4.5/include/linux/mtd/ubi.h
@@ -25,6 +25,8 @@
#include <linux/types.h>
#include <mtd/ubi-user.h>
+
+#define UBI_ALL -1
/*
* enum ubi_open_mode - UBI volume open mode constants.
*
@@ -198,6 +200,9 @@ void ubi_get_volume_info(struct ubi_volume_desc *desc,
struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode);
struct ubi_volume_desc *ubi_open_volume_nm(int ubi_num, const char *name,
int mode);
+
+void ubi_update_volume(struct ubi_volume_desc *desc);
+
struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode);
int ubi_register_volume_notifier(struct notifier_block *nb,
@@ -205,17 +210,27 @@ int ubi_register_volume_notifier(struct notifier_block *nb,
int ubi_unregister_volume_notifier(struct notifier_block *nb);
void ubi_close_volume(struct ubi_volume_desc *desc);
+void ubi_set_volume(struct ubi_volume_desc *desc);
+
int ubi_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset,
int len, int check);
int ubi_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf,
- int offset, int len, int dtype);
+ int offset, int len);
+
+int ubi_leb_read_oob(struct ubi_volume_desc *desc, int lnum, void *buf, int offset,
+ int len, void *spare);
+
+int ubi_leb_write_oob(struct ubi_volume_desc *desc, int lnum, const void *buf, int offset,
+ int len, void *spare, int dtype);
+
int ubi_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf,
- int len, int dtype);
+ int len);
int ubi_leb_erase(struct ubi_volume_desc *desc, int lnum);
int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum);
-int ubi_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype);
+int ubi_leb_map(struct ubi_volume_desc *desc, int lnum);
int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum);
int ubi_sync(int ubi_num);
+int ubi_flush(int ubi_num, int vol_id, int lnum);
/*
* This function is the same as the 'ubi_leb_read()' function, but it does not
@@ -234,7 +249,7 @@ static inline int ubi_read(struct ubi_volume_desc *desc, int lnum, char *buf,
static inline int ubi_write(struct ubi_volume_desc *desc, int lnum,
const void *buf, int offset, int len)
{
- return ubi_leb_write(desc, lnum, buf, offset, len, UBI_UNKNOWN);
+ return ubi_leb_write(desc, lnum, buf, offset, len);
}
/*
@@ -244,7 +259,7 @@ static inline int ubi_write(struct ubi_volume_desc *desc, int lnum,
static inline int ubi_change(struct ubi_volume_desc *desc, int lnum,
const void *buf, int len)
{
- return ubi_leb_change(desc, lnum, buf, len, UBI_UNKNOWN);
+ return ubi_leb_change(desc, lnum, buf, len);
}
#endif /* !__LINUX_UBI_H__ */