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 _LINUX_MINIX_FS_H
20#define _LINUX_MINIX_FS_H
21#include <linux/types.h>
22#include <linux/magic.h>
23#define MINIX_ROOT_INO 1
24#define MINIX_LINK_MAX 250
25#define MINIX2_LINK_MAX 65530
26#define MINIX_I_MAP_SLOTS 8
27#define MINIX_Z_MAP_SLOTS 64
28#define MINIX_VALID_FS 0x0001
29#define MINIX_ERROR_FS 0x0002
30#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE) / (sizeof(struct minix_inode)))
31struct minix_inode {
32  __u16 i_mode;
33  __u16 i_uid;
34  __u32 i_size;
35  __u32 i_time;
36  __u8 i_gid;
37  __u8 i_nlinks;
38  __u16 i_zone[9];
39};
40struct minix2_inode {
41  __u16 i_mode;
42  __u16 i_nlinks;
43  __u16 i_uid;
44  __u16 i_gid;
45  __u32 i_size;
46  __u32 i_atime;
47  __u32 i_mtime;
48  __u32 i_ctime;
49  __u32 i_zone[10];
50};
51struct minix_super_block {
52  __u16 s_ninodes;
53  __u16 s_nzones;
54  __u16 s_imap_blocks;
55  __u16 s_zmap_blocks;
56  __u16 s_firstdatazone;
57  __u16 s_log_zone_size;
58  __u32 s_max_size;
59  __u16 s_magic;
60  __u16 s_state;
61  __u32 s_zones;
62};
63struct minix3_super_block {
64  __u32 s_ninodes;
65  __u16 s_pad0;
66  __u16 s_imap_blocks;
67  __u16 s_zmap_blocks;
68  __u16 s_firstdatazone;
69  __u16 s_log_zone_size;
70  __u16 s_pad1;
71  __u32 s_max_size;
72  __u32 s_zones;
73  __u16 s_magic;
74  __u16 s_pad2;
75  __u16 s_blocksize;
76  __u8 s_disk_version;
77};
78struct minix_dir_entry {
79  __u16 inode;
80  char name[0];
81};
82struct minix3_dir_entry {
83  __u32 inode;
84  char name[0];
85};
86#endif
87