blob: 11d219e0d275b729b1b975b4a4bf13fb17051993 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#ifndef LSMTD_H
#define LSMTD_H
#define PROGRAM_NAME "lsmtd"
#include "common.h"
#include "xalloc.h"
#include <libmtd.h>
#include <libubi.h>
#define COL_DEVNAME 1
#define COL_DEVNUM 2
#define COL_TYPE 3
#define COL_NAME 4
#define COL_SIZE 5
#define COL_EBSIZE 6
#define COL_EBCOUNT 7
#define COL_MINIO 8
#define COL_SUBSIZE 9
#define COL_OOBSIZE 10
#define COL_MAXEC 11
#define COL_FREE 12
#define COL_FREE_LEB 13
#define COL_BAD_COUNT 14
#define COL_BAD_RSVD 15
#define COL_RO 16
#define COL_BB 17
#define COL_REGION 18
#define COL_CORRUPTED 19
#define COL_DT_STRING 1
#define COL_DT_NUMBER 2
#define COL_DT_SIZE 3
#define COL_DT_BOOL 4
struct ubi_node {
struct ubi_dev_info info;
struct ubi_vol_info *vol_info;
};
struct mtd_node {
struct mtd_dev_info info;
struct ubi_node *ubi;
};
struct column {
const char *name;
const char *desc;
int type;
int datatype;
size_t width;
};
extern struct ubi_node *ubi_dev;
extern int num_ubi_devices;
extern struct mtd_node *mtd_dev;
extern int num_mtd_devices;
extern struct column *sort_by;
int scan_mtd(libmtd_t lib_mtd);
int scan_ubi(libubi_t lib_ubi);
void scan_free(void);
#endif /* LSMTD_H */
|