+//! Architectual maximum number of file descriptors
+#define MAX_FILE_DESCS 128
+
+/**
+ * \brief VFS_Seek directions
+ */
+enum eVFS_SeekDirs
+{
+ SEEK_SET = 1, //!< Set the current file offset
+ SEEK_CUR = 0, //!< Seek relative to the current position
+ SEEK_END = -1 //!< Seek from the end of the file backwards
+};
+
+/**
+ * \name ACL Permissions
+ * \{
+ */
+/**
+ * \brief Readable
+ */
+#define VFS_PERM_READ 0x00000001
+/**
+ * \brief Writeable
+ */
+#define VFS_PERM_WRITE 0x00000002
+/**
+ * \brief Append allowed
+ */
+#define VFS_PERM_APPEND 0x00000004
+/**
+ * \brief Executable
+ */
+#define VFS_PERM_EXECUTE 0x00000008
+/**
+ * \brief All permissions granted
+ */
+#define VFS_PERM_ALL 0x7FFFFFFF // Mask for permissions
+/**
+ * \brief Denies instead of granting permissions
+ * \note Denials take precedence
+ */
+#define VFS_PERM_DENY 0x80000000 // Inverts permissions
+/**
+ * \}
+ */
+
+#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
+ */
+typedef struct sVFS_ACL
+{
+ struct {
+ unsigned Group: 1; //!< Group (as opposed to user) flag
+ unsigned ID: 31; //!< ID of Group/User (-1 for nobody/world)
+ };
+ struct {
+ unsigned Inv: 1; //!< Invert Permissions
+ unsigned Perms: 31; //!< Permission Flags
+ };
+} tVFS_ACL;
+
+/**
+ * \brief SYS_FINFO structure
+ */
+typedef struct sFInfo
+{
+ 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
+ Sint32 numacls; //!< Total number of ACL entries
+ tVFS_ACL acls[]; //!< ACL buffer (size is passed in the \a MaxACLs argument to VFS_FInfo)
+} tFInfo;
+
+/**
+ * \brief fd_set for select()
+ */
+typedef struct
+{
+ Uint16 flags[MAX_FILE_DESCS/16];
+} fd_set;
+
+#define FD_CLR(fd, fdsetp) ((fdsetp)->flags[(fd)/16]&=~(1<<((fd)%16)))
+#define FD_SET(fd, fdsetp) ((fdsetp)->flags[(fd)/16]|=~(1<<((fd)%16)))
+#define FD_ISSET(fd, fdsetp) ((fdsetp)->flags[(fd)/16]&(1<<((fd)%16)))