~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/qnx6_fs.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  *  Name                 : qnx6_fs.h
  4  *  Author               : Kai Bankett
  5  *  Function             : qnx6 global filesystem definitions
  6  *  History              : 17-01-2012 created
  7  */
  8 #ifndef _LINUX_QNX6_FS_H
  9 #define _LINUX_QNX6_FS_H
 10 
 11 #include <linux/types.h>
 12 #include <linux/magic.h>
 13 
 14 #define QNX6_ROOT_INO 1
 15 
 16 /* for di_status */
 17 #define QNX6_FILE_DIRECTORY     0x01
 18 #define QNX6_FILE_DELETED       0x02
 19 #define QNX6_FILE_NORMAL        0x03
 20 
 21 #define QNX6_SUPERBLOCK_SIZE    0x200   /* superblock always is 512 bytes */
 22 #define QNX6_SUPERBLOCK_AREA    0x1000  /* area reserved for superblock */
 23 #define QNX6_BOOTBLOCK_SIZE     0x2000  /* heading bootblock area */
 24 #define QNX6_DIR_ENTRY_SIZE     0x20    /* dir entry size of 32 bytes */
 25 #define QNX6_INODE_SIZE         0x80    /* each inode is 128 bytes */
 26 #define QNX6_INODE_SIZE_BITS    7       /* inode entry size shift */
 27 
 28 #define QNX6_NO_DIRECT_POINTERS 16      /* 16 blockptrs in sbl/inode */
 29 #define QNX6_PTR_MAX_LEVELS     5       /* maximum indirect levels */
 30 
 31 /* for filenames */
 32 #define QNX6_SHORT_NAME_MAX     27
 33 #define QNX6_LONG_NAME_MAX      510
 34 
 35 /* list of mount options */
 36 #define QNX6_MOUNT_MMI_FS       0x010000 /* mount as Audi MMI 3G fs */
 37 
 38 /*
 39  * This is the original qnx6 inode layout on disk.
 40  * Each inode is 128 byte long.
 41  */
 42 struct qnx6_inode_entry {
 43         __fs64          di_size;
 44         __fs32          di_uid;
 45         __fs32          di_gid;
 46         __fs32          di_ftime;
 47         __fs32          di_mtime;
 48         __fs32          di_atime;
 49         __fs32          di_ctime;
 50         __fs16          di_mode;
 51         __fs16          di_ext_mode;
 52         __fs32          di_block_ptr[QNX6_NO_DIRECT_POINTERS];
 53         __u8            di_filelevels;
 54         __u8            di_status;
 55         __u8            di_unknown2[2];
 56         __fs32          di_zero2[6];
 57 };
 58 
 59 /*
 60  * Each directory entry is maximum 32 bytes long.
 61  * If more characters or special characters required it is stored
 62  * in the longfilenames structure.
 63  */
 64 struct qnx6_dir_entry {
 65         __fs32          de_inode;
 66         __u8            de_size;
 67         char            de_fname[QNX6_SHORT_NAME_MAX];
 68 };
 69 
 70 /*
 71  * Longfilename direntries have a different structure
 72  */
 73 struct qnx6_long_dir_entry {
 74         __fs32          de_inode;
 75         __u8            de_size;
 76         __u8            de_unknown[3];
 77         __fs32          de_long_inode;
 78         __fs32          de_checksum;
 79 };
 80 
 81 struct qnx6_long_filename {
 82         __fs16          lf_size;
 83         __u8            lf_fname[QNX6_LONG_NAME_MAX];
 84 };
 85 
 86 struct qnx6_root_node {
 87         __fs64          size;
 88         __fs32          ptr[QNX6_NO_DIRECT_POINTERS];
 89         __u8            levels;
 90         __u8            mode;
 91         __u8            spare[6];
 92 };
 93 
 94 struct qnx6_super_block {
 95         __fs32          sb_magic;
 96         __fs32          sb_checksum;
 97         __fs64          sb_serial;
 98         __fs32          sb_ctime;       /* time the fs was created */
 99         __fs32          sb_atime;       /* last access time */
100         __fs32          sb_flags;
101         __fs16          sb_version1;    /* filesystem version information */
102         __fs16          sb_version2;    /* filesystem version information */
103         __u8            sb_volumeid[16];
104         __fs32          sb_blocksize;
105         __fs32          sb_num_inodes;
106         __fs32          sb_free_inodes;
107         __fs32          sb_num_blocks;
108         __fs32          sb_free_blocks;
109         __fs32          sb_allocgroup;
110         struct qnx6_root_node Inode;
111         struct qnx6_root_node Bitmap;
112         struct qnx6_root_node Longfile;
113         struct qnx6_root_node Unknown;
114 };
115 
116 /* Audi MMI 3G superblock layout is different to plain qnx6 */
117 struct qnx6_mmi_super_block {
118         __fs32          sb_magic;
119         __fs32          sb_checksum;
120         __fs64          sb_serial;
121         __u8            sb_spare0[12];
122         __u8            sb_id[12];
123         __fs32          sb_blocksize;
124         __fs32          sb_num_inodes;
125         __fs32          sb_free_inodes;
126         __fs32          sb_num_blocks;
127         __fs32          sb_free_blocks;
128         __u8            sb_spare1[4];
129         struct qnx6_root_node Inode;
130         struct qnx6_root_node Bitmap;
131         struct qnx6_root_node Longfile;
132         struct qnx6_root_node Unknown;
133 };
134 
135 #endif
136 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php