Kernel/armv7 - Fixing bugs, Proc_Clone works now
[tpg/acess2.git] / Kernel / include / vfs_ext.h
index 060a01c..d04fcf2 100644 (file)
@@ -6,6 +6,9 @@
 #ifndef _VFS_EXT_H
 #define _VFS_EXT_H
 
+typedef Uint64 tInode;
+typedef Uint32 tMount;
+
 // === CONSTANTS ===
 //! Maximum size of a Memory Path generated by VFS_GetMemPath
 #define        VFS_MEMPATH_SIZE        (3 + (BITS/4)*2)
@@ -75,6 +78,15 @@ enum eVFS_SeekDirs
  * \}
  */
 
+#define MMAP_PROT_READ 0x001
+#define MMAP_PROT_WRITE        0x002
+#define MMAP_PROT_EXEC 0x004
+
+#define MMAP_MAP_SHARED        0x001
+#define MMAP_MAP_PRIVATE       0x002
+#define MMAP_MAP_FIXED         0x004
+#define MMAP_MAP_ANONYMOUS     0x008
+
 // -- System Call Structures ---
 /**
  * \brief ACL Defintion Structure
@@ -96,14 +108,16 @@ typedef struct sVFS_ACL
  */
 typedef struct sFInfo
 {
-       Uint    uid;    //!< Owning User ID
-       Uint    gid;    //!< Owning Group ID
-       Uint    flags;  //!< File flags
+       tMount  mount;  //!< Mountpoint ID
+       tInode  inode;  //!< Inode
+       Uint32  uid;    //!< Owning User ID
+       Uint32  gid;    //!< Owning Group ID
+       Uint32  flags;  //!< File flags
        Uint64  size;   //!< File Size
        Sint64  atime;  //!< Last Accessed time
        Sint64  mtime;  //!< Last modified time
        Sint64  ctime;  //!< Creation time
-        int    numacls;        //!< Total number of ACL entries
+       Sint32  numacls;        //!< Total number of ACL entries
        tVFS_ACL        acls[]; //!< ACL buffer (size is passed in the \a MaxACLs argument to VFS_FInfo)
 }      tFInfo;
 
@@ -133,6 +147,24 @@ extern int VFS_Init(void);
  * \return VFS Handle (an integer) or -1 if an error occured
  */
 extern int     VFS_Open(const char *Path, Uint Mode);
+/**
+ * \brief Opens a file via an open directory
+ * \note The file to open must be a direct child of the parent
+ * \param FD   Parent Directory
+ * \param Name Child name
+ * \param Mode Open mode
+ * \return File handle (same as returned from VFS_Open)
+ */
+extern int     VFS_OpenChild(int FD, const char *Name, Uint Mode);
+/**
+ * \brief Opens a file given a mount ID and an inode number
+ * \param Mount        Mount ID returned by FInfo
+ * \param Inode        Inode number from FInfo
+ * \param Mode Open mode (see VFS_Open)
+ * \return File handle (same as VFS_Open)
+ */
+extern int     VFS_OpenInode(Uint32 Mount, Uint64 Inode, int Mode);
+
 /**
  * \brief Close a currently open file
  * \param FD   Handle returned by ::VFS_Open
@@ -281,24 +313,6 @@ extern int VFS_Symlink(const char *Name, const char *Link);
  * \return Boolean Success
  */
 extern int     VFS_ReadDir(int FD, char *Dest);
-/**
- * \brief Opens a file via an open directory
- * \note The file to open must be a direct child of the parent
- * \param FD   Parent Directory
- * \param Name Child name
- * \param Mode Open mode
- * \return File handle (same as returned from VFS_Open)
- */
-extern int     VFS_OpenChild(int FD, const char *Name, Uint Mode);
-
-/**
- * \brief Opens a file given a mount ID and an inode number
- * \param Mount        Mount ID returned by FInfo
- * \param Inode        Inode number from FInfo
- * \param Mode Open mode (see VFS_Open)
- * \return File handle (same as VFS_Open)
- */
-extern int     VFS_OpenInode(Uint32 Mount, Uint64 Inode, int Mode);
 /**
  * \brief Wait for an aciton on a file descriptor
  * \param MaxHandle    Maximum set handle in \a *Handles

UCC git Repository :: git.ucc.asn.au