123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- #ifndef __LIBSCAN_H__
- #define __LIBSCAN_H__
- #include <stdint.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define NO_EC 0xFFFFFFFF
- #define CORRUPT_EC 0xFFFFFFFE
- enum
- {
- EB_EMPTY = 0xFFFFFFFF,
- EB_CORRUPTED = 0xFFFFFFFE,
- EB_ALIEN = 0xFFFFFFFD,
- EB_BAD = 0xFFFFFFFC,
- EC_MAX = UBI_MAX_ERASECOUNTER,
- };
- struct ubi_scan_info
- {
- uint32_t *ec;
- long long mean_ec;
- int ok_cnt;
- int empty_cnt;
- int corrupted_cnt;
- int alien_cnt;
- int bad_cnt;
- int good_cnt;
- int vid_hdr_offs;
- int data_offs;
- };
- struct mtd_dev_info;
- int ubi_scan(struct mtd_dev_info *mtd, int fd, struct ubi_scan_info **info,
- int verbose);
- void ubi_scan_free(struct ubi_scan_info *si);
- #ifdef __cplusplus
- }
- #endif
- #endif
|