Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  *  Name                         : qnx4_fs.h
0004  *  Author                       : Richard Frowijn
0005  *  Function                     : qnx4 global filesystem definitions
0006  *  History                      : 23-03-1998 created
0007  */
0008 #ifndef _LINUX_QNX4_FS_H
0009 #define _LINUX_QNX4_FS_H
0010 
0011 #include <linux/types.h>
0012 #include <linux/qnxtypes.h>
0013 #include <linux/magic.h>
0014 
0015 #define QNX4_ROOT_INO 1
0016 
0017 #define QNX4_MAX_XTNTS_PER_XBLK 60
0018 /* for di_status */
0019 #define QNX4_FILE_USED          0x01
0020 #define QNX4_FILE_MODIFIED      0x02
0021 #define QNX4_FILE_BUSY          0x04
0022 #define QNX4_FILE_LINK          0x08
0023 #define QNX4_FILE_INODE         0x10
0024 #define QNX4_FILE_FSYSCLEAN     0x20
0025 
0026 #define QNX4_I_MAP_SLOTS    8
0027 #define QNX4_Z_MAP_SLOTS    64
0028 #define QNX4_VALID_FS       0x0001  /* Clean fs. */
0029 #define QNX4_ERROR_FS       0x0002  /* fs has errors. */
0030 #define QNX4_BLOCK_SIZE         0x200   /* blocksize of 512 bytes */
0031 #define QNX4_BLOCK_SIZE_BITS    9   /* blocksize shift */
0032 #define QNX4_DIR_ENTRY_SIZE     0x040   /* dir entry size of 64 bytes */
0033 #define QNX4_DIR_ENTRY_SIZE_BITS 6  /* dir entry size shift */
0034 #define QNX4_XBLK_ENTRY_SIZE    0x200   /* xblk entry size */
0035 #define QNX4_INODES_PER_BLOCK   0x08    /* 512 / 64 */
0036 
0037 /* for filenames */
0038 #define QNX4_SHORT_NAME_MAX 16
0039 #define QNX4_NAME_MAX       48
0040 
0041 /*
0042  * This is the original qnx4 inode layout on disk.
0043  */
0044 struct qnx4_inode_entry {
0045     char        di_fname[QNX4_SHORT_NAME_MAX];
0046     qnx4_off_t  di_size;
0047     qnx4_xtnt_t di_first_xtnt;
0048     __le32      di_xblk;
0049     __le32      di_ftime;
0050     __le32      di_mtime;
0051     __le32      di_atime;
0052     __le32      di_ctime;
0053     qnx4_nxtnt_t    di_num_xtnts;
0054     qnx4_mode_t di_mode;
0055     qnx4_muid_t di_uid;
0056     qnx4_mgid_t di_gid;
0057     qnx4_nlink_t    di_nlink;
0058     __u8        di_zero[4];
0059     qnx4_ftype_t    di_type;
0060     __u8        di_status;
0061 };
0062 
0063 struct qnx4_link_info {
0064     char        dl_fname[QNX4_NAME_MAX];
0065     __le32      dl_inode_blk;
0066     __u8        dl_inode_ndx;
0067     __u8        dl_spare[10];
0068     __u8        dl_status;
0069 };
0070 
0071 struct qnx4_xblk {
0072     __le32      xblk_next_xblk;
0073     __le32      xblk_prev_xblk;
0074     __u8        xblk_num_xtnts;
0075     __u8        xblk_spare[3];
0076     __le32      xblk_num_blocks;
0077     qnx4_xtnt_t xblk_xtnts[QNX4_MAX_XTNTS_PER_XBLK];
0078     char        xblk_signature[8];
0079     qnx4_xtnt_t xblk_first_xtnt;
0080 };
0081 
0082 struct qnx4_super_block {
0083     struct qnx4_inode_entry RootDir;
0084     struct qnx4_inode_entry Inode;
0085     struct qnx4_inode_entry Boot;
0086     struct qnx4_inode_entry AltBoot;
0087 };
0088 
0089 #endif