• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  /****************************************************************************
2   ****************************************************************************
3   ***
4   ***   This header was automatically generated from a Linux kernel header
5   ***   of the same name, to make information necessary for userspace to
6   ***   call into the kernel available to libc.  It contains only constants,
7   ***   structures, and macros generated from the original header, and thus,
8   ***   contains no copyrightable information.
9   ***
10   ***   To edit the content of this header, modify the corresponding
11   ***   source file (e.g. under external/kernel-headers/original/) then
12   ***   run bionic/libc/kernel/tools/update_all.py
13   ***
14   ***   Any manual change here will be lost the next time this script will
15   ***   be run. You've been warned!
16   ***
17   ****************************************************************************
18   ****************************************************************************/
19  #ifndef __MTD_NFTL_USER_H__
20  #define __MTD_NFTL_USER_H__
21  #include <linux/types.h>
22  struct nftl_bci {
23    unsigned char ECCSig[6];
24    __u8 Status;
25    __u8 Status1;
26  } __attribute__((packed));
27  struct nftl_uci0 {
28    __u16 VirtUnitNum;
29    __u16 ReplUnitNum;
30    __u16 SpareVirtUnitNum;
31    __u16 SpareReplUnitNum;
32  } __attribute__((packed));
33  struct nftl_uci1 {
34    __u32 WearInfo;
35    __u16 EraseMark;
36    __u16 EraseMark1;
37  } __attribute__((packed));
38  struct nftl_uci2 {
39    __u16 FoldMark;
40    __u16 FoldMark1;
41    __u32 unused;
42  } __attribute__((packed));
43  union nftl_uci {
44    struct nftl_uci0 a;
45    struct nftl_uci1 b;
46    struct nftl_uci2 c;
47  };
48  struct nftl_oob {
49    struct nftl_bci b;
50    union nftl_uci u;
51  };
52  struct NFTLMediaHeader {
53    char DataOrgID[6];
54    __u16 NumEraseUnits;
55    __u16 FirstPhysicalEUN;
56    __u32 FormattedSize;
57    unsigned char UnitSizeFactor;
58  } __attribute__((packed));
59  #define MAX_ERASE_ZONES (8192 - 512)
60  #define ERASE_MARK 0x3c69
61  #define SECTOR_FREE 0xff
62  #define SECTOR_USED 0x55
63  #define SECTOR_IGNORE 0x11
64  #define SECTOR_DELETED 0x00
65  #define FOLD_MARK_IN_PROGRESS 0x5555
66  #define ZONE_GOOD 0xff
67  #define ZONE_BAD_ORIGINAL 0
68  #define ZONE_BAD_MARKED 7
69  #endif
70