diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-07-26 18:06:58 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-07-26 18:45:03 +0300 |
commit | e1b213ceabcc5984c7cb9e73c44eaced31c6d7e9 (patch) | |
tree | 107ff94d4d9a2cb38f1c0af9daac1d21331a7342 /ubi-utils/include | |
parent | 8b3cdd8105452737eba043c2e83cbfd8454223e1 (diff) |
ubinize: add sequence number support
UBI now supports the image sequence number feature which
prevents UBI from mistakingly accepting half-written images,
if the image was written on top of an older image. Support
this feature in ubinize and make it pick a random
number for the UBI image sequence number.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/include')
-rw-r--r-- | ubi-utils/include/libscan.h | 1 | ||||
-rw-r--r-- | ubi-utils/include/libubigen.h | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ubi-utils/include/libscan.h b/ubi-utils/include/libscan.h index 3ba291f..a2b8657 100644 --- a/ubi-utils/include/libscan.h +++ b/ubi-utils/include/libscan.h @@ -111,4 +111,3 @@ void ubi_scan_free(struct ubi_scan_info *si); #endif #endif /* __LIBSCAN_H__ */ - diff --git a/ubi-utils/include/libubigen.h b/ubi-utils/include/libubigen.h index 34cd91a..2b567d3 100644 --- a/ubi-utils/include/libubigen.h +++ b/ubi-utils/include/libubigen.h @@ -42,6 +42,7 @@ extern "C" { * @ubi_ver: UBI version * @vtbl_size: volume table size * @max_volumes: maximum amount of volumes + * @image_seq: UBI image sequence number */ struct ubigen_info { @@ -53,6 +54,7 @@ struct ubigen_info int ubi_ver; int vtbl_size; int max_volumes; + uint32_t image_seq; }; /** @@ -89,7 +91,8 @@ struct ubigen_vol_info }; void ubigen_info_init(struct ubigen_info *ui, int peb_size, int min_io_size, - int subpage_size, int vid_hdr_offs, int ubi_ver); + int subpage_size, int vid_hdr_offs, int ubi_ver, + uint32_t image_seq); struct ubi_vtbl_record *ubigen_create_empty_vtbl(const struct ubigen_info *ui); void ubigen_init_ec_hdr(const struct ubigen_info *ui, struct ubi_ec_hdr *hdr, long long ec); |