Changeset 598 for trunk/kernel/fs/vfs.h
- Timestamp:
- Nov 10, 2018, 3:06:00 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/vfs.h
r568 r598 76 76 77 77 /****************************************************************************************** 78 * This define the masks for the POSIX access rights to inodes79 *****************************************************************************************/80 81 #define VFS_ISUID 0x000400082 #define VFS_ISGID 0x000200083 #define VFS_ISVTX 0x000100084 85 #define VFS_IRWXU 0x000070086 #define VFS_IRUSR 0x000040087 #define VFS_IWUSR 0x000020088 #define VFS_IXUSR 0x000010089 90 #define VFS_IRWXG 0x000007091 #define VFS_IRGRP 0x000004092 #define VFS_IWGRP 0x000002093 #define VFS_IXGRP 0x000001094 95 #define VFS_IRWXO 0x000000796 #define VFS_IROTH 0x000000497 #define VFS_IWOTH 0x000000298 #define VFS_IXOTH 0x000000199 100 #define VFS_IREAD VFS_IRUSR101 #define VFS_IWRITE VFS_IWUSR102 #define VFS_IEXEC VFS_IXUSR103 104 105 /******************************************************************************************106 78 * This structure defines a VFS context, that contains informations common to all inodes 107 79 * and dentries for a given file system. As it is declared as a global variable in the … … 155 127 156 128 /* this enum define the VFS inode types values */ 129 /* WARNING : this enum must be kept consistent with macros in <shared_stat.h> file */ 157 130 158 131 typedef enum 159 132 { 160 INODE_TYPE_FILE = 0, /*! file*/133 INODE_TYPE_FILE = 0, /*! regular file */ 161 134 INODE_TYPE_DIR = 1, /*! directory */ 162 135 INODE_TYPE_FIFO = 2, /*! POSIX named pipe */ 163 136 INODE_TYPE_PIPE = 3, /*! POSIX anonymous pipe */ 164 137 INODE_TYPE_SOCK = 4, /*! POSIX socket */ 165 INODE_TYPE_DEV = 5, /*! device channel*/138 INODE_TYPE_DEV = 5, /*! character device */ 166 139 INODE_TYPE_SYML = 6, /*! symbolic link */ 167 140 } … … 187 160 uint32_t size; /*! number of bytes */ 188 161 uint32_t links; /*! number of alias dentry */ 189 ui d_tuid; /*! user owner identifier */190 gid_tgid; /*! group owner identifier */162 uint32_t uid; /*! user owner identifier */ 163 uint32_t gid; /*! group owner identifier */ 191 164 uint32_t rights; /*! access rights */ 192 165 uint32_t refcount; /*! reference counter (all pointers) */ … … 201 174 } 202 175 vfs_inode_t; 176 177 /* This define the masks for the inode <rights> field */ 178 179 #define VFS_ISUID 0x0004000 180 #define VFS_ISGID 0x0002000 181 #define VFS_ISVTX 0x0001000 182 183 #define VFS_IRWXU 0x0000700 184 #define VFS_IRUSR 0x0000400 185 #define VFS_IWUSR 0x0000200 186 #define VFS_IXUSR 0x0000100 187 188 #define VFS_IRWXG 0x0000070 189 #define VFS_IRGRP 0x0000040 190 #define VFS_IWGRP 0x0000020 191 #define VFS_IXGRP 0x0000010 192 193 #define VFS_IRWXO 0x0000007 194 #define VFS_IROTH 0x0000004 195 #define VFS_IWOTH 0x0000002 196 #define VFS_IXOTH 0x0000001 203 197 204 198 /****************************************************************************************** … … 514 508 /******************* Inode-Tree related functions ****************************************/ 515 509 /*****************************************************************************************/ 510 511 /****************************************************************************************** 512 * This function returns a printable string for the inode type. 513 *****************************************************************************************/ 514 const char * vfs_inode_type_str( vfs_inode_type_t type ); 516 515 517 516 /****************************************************************************************** … … 712 711 713 712 /****************************************************************************************** 714 * This function returns, in the structure pointed by the < k_stat> kernelpointer,715 * various informations on the file descriptor identified by the <file_xp> argument.716 * TODO notimplemented yet...717 ****************************************************************************************** 718 * @ file_xp : extended pointer on the file descriptor of the searched directory.719 * @ k_stat: local pointer on the stat structure in kernel space.713 * This function returns, in the structure pointed by the <st> pointer, 714 * various informations on the inode identified by the <inode_xp> argument. 715 * TODO : only partially implemented yet... 716 ****************************************************************************************** 717 * @ inode_xp : extended pointer on the remote inode. 718 * @ st : local pointer on the stat structure in kernel space. 720 719 * @ returns 0 if success / -1 if error. 721 720 *****************************************************************************************/ 722 error_t vfs_stat( xptr_t file_xp,723 struct stat * k_stat );721 error_t vfs_stat( xptr_t inode_xp, 722 struct stat * st ); 724 723 725 724 /******************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.