| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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_QNX4_FS_H | 
|  | 20 | #define _LINUX_QNX4_FS_H | 
|  | 21 | #include <linux/types.h> | 
|  | 22 | #include <linux/qnxtypes.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #include <linux/magic.h> | 
|  | 24 | #define QNX4_ROOT_INO 1 | 
|  | 25 | #define QNX4_MAX_XTNTS_PER_XBLK 60 | 
|  | 26 | #define QNX4_FILE_USED 0x01 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define QNX4_FILE_MODIFIED 0x02 | 
|  | 28 | #define QNX4_FILE_BUSY 0x04 | 
|  | 29 | #define QNX4_FILE_LINK 0x08 | 
|  | 30 | #define QNX4_FILE_INODE 0x10 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define QNX4_FILE_FSYSCLEAN 0x20 | 
|  | 32 | #define QNX4_I_MAP_SLOTS 8 | 
|  | 33 | #define QNX4_Z_MAP_SLOTS 64 | 
|  | 34 | #define QNX4_VALID_FS 0x0001 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define QNX4_ERROR_FS 0x0002 | 
|  | 36 | #define QNX4_BLOCK_SIZE 0x200 | 
|  | 37 | #define QNX4_BLOCK_SIZE_BITS 9 | 
|  | 38 | #define QNX4_DIR_ENTRY_SIZE 0x040 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define QNX4_DIR_ENTRY_SIZE_BITS 6 | 
|  | 40 | #define QNX4_XBLK_ENTRY_SIZE 0x200 | 
|  | 41 | #define QNX4_INODES_PER_BLOCK 0x08 | 
|  | 42 | #define QNX4_SHORT_NAME_MAX 16 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define QNX4_NAME_MAX 48 | 
|  | 44 | struct qnx4_inode_entry { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | char di_fname[QNX4_SHORT_NAME_MAX]; | 
|  | 46 | qnx4_off_t di_size; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | qnx4_xtnt_t di_first_xtnt; | 
|  | 48 | __le32 di_xblk; | 
|  | 49 | __le32 di_ftime; | 
|  | 50 | __le32 di_mtime; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | __le32 di_atime; | 
|  | 52 | __le32 di_ctime; | 
|  | 53 | qnx4_nxtnt_t di_num_xtnts; | 
|  | 54 | qnx4_mode_t di_mode; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | qnx4_muid_t di_uid; | 
|  | 56 | qnx4_mgid_t di_gid; | 
|  | 57 | qnx4_nlink_t di_nlink; | 
|  | 58 | __u8 di_zero[4]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | qnx4_ftype_t di_type; | 
|  | 60 | __u8 di_status; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | }; | 
|  | 62 | struct qnx4_link_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | char dl_fname[QNX4_NAME_MAX]; | 
|  | 64 | __le32 dl_inode_blk; | 
|  | 65 | __u8 dl_inode_ndx; | 
|  | 66 | __u8 dl_spare[10]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | __u8 dl_status; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | }; | 
|  | 69 | struct qnx4_xblk { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 70 | __le32 xblk_next_xblk; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __le32 xblk_prev_xblk; | 
|  | 72 | __u8 xblk_num_xtnts; | 
|  | 73 | __u8 xblk_spare[3]; | 
|  | 74 | __le32 xblk_num_blocks; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | qnx4_xtnt_t xblk_xtnts[QNX4_MAX_XTNTS_PER_XBLK]; | 
|  | 76 | char xblk_signature[8]; | 
|  | 77 | qnx4_xtnt_t xblk_first_xtnt; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | struct qnx4_super_block { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 80 | struct qnx4_inode_entry RootDir; | 
|  | 81 | struct qnx4_inode_entry Inode; | 
|  | 82 | struct qnx4_inode_entry Boot; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | struct qnx4_inode_entry AltBoot; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 84 | }; | 
|  | 85 | #endif |