blob: 0878efea99c3bd77d9b131bc38185b51fb50c54e [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define MINIX_ROOT_INO 1
24#define MINIX_LINK_MAX 250
25#define MINIX2_LINK_MAX 65530
26#define MINIX_I_MAP_SLOTS 8
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define MINIX_Z_MAP_SLOTS 64
28#define MINIX_VALID_FS 0x0001
29#define MINIX_ERROR_FS 0x0002
Tao Baod7db5942015-01-28 10:07:51 -080030#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE) / (sizeof(struct minix_inode)))
Ben Cheng655a7c02013-10-16 16:09:24 -070031struct minix_inode {
Tao Baod7db5942015-01-28 10:07:51 -080032 __u16 i_mode;
33 __u16 i_uid;
34 __u32 i_size;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u32 i_time;
36 __u8 i_gid;
37 __u8 i_nlinks;
38 __u16 i_zone[9];
Ben Cheng655a7c02013-10-16 16:09:24 -070039};
40struct minix2_inode {
Tao Baod7db5942015-01-28 10:07:51 -080041 __u16 i_mode;
42 __u16 i_nlinks;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u16 i_uid;
44 __u16 i_gid;
45 __u32 i_size;
46 __u32 i_atime;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u32 i_mtime;
48 __u32 i_ctime;
49 __u32 i_zone[10];
Ben Cheng655a7c02013-10-16 16:09:24 -070050};
Ben Cheng655a7c02013-10-16 16:09:24 -070051struct minix_super_block {
Tao Baod7db5942015-01-28 10:07:51 -080052 __u16 s_ninodes;
53 __u16 s_nzones;
54 __u16 s_imap_blocks;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u16 s_zmap_blocks;
56 __u16 s_firstdatazone;
57 __u16 s_log_zone_size;
58 __u32 s_max_size;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u16 s_magic;
60 __u16 s_state;
61 __u32 s_zones;
Ben Cheng655a7c02013-10-16 16:09:24 -070062};
Ben Cheng655a7c02013-10-16 16:09:24 -070063struct minix3_super_block {
Tao Baod7db5942015-01-28 10:07:51 -080064 __u32 s_ninodes;
65 __u16 s_pad0;
66 __u16 s_imap_blocks;
Tao Baod7db5942015-01-28 10:07:51 -080067 __u16 s_zmap_blocks;
68 __u16 s_firstdatazone;
69 __u16 s_log_zone_size;
70 __u16 s_pad1;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 s_max_size;
72 __u32 s_zones;
73 __u16 s_magic;
74 __u16 s_pad2;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u16 s_blocksize;
76 __u8 s_disk_version;
Ben Cheng655a7c02013-10-16 16:09:24 -070077};
78struct minix_dir_entry {
Tao Baod7db5942015-01-28 10:07:51 -080079 __u16 inode;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070080 char name[];
Ben Cheng655a7c02013-10-16 16:09:24 -070081};
82struct minix3_dir_entry {
Tao Baod7db5942015-01-28 10:07:51 -080083 __u32 inode;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070084 char name[];
Ben Cheng655a7c02013-10-16 16:09:24 -070085};
86#endif