git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://cadel.mutabah.net/acess2
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
include
/
vfs_ext.h
diff --git
a/KernelLand/Kernel/include/vfs_ext.h
b/KernelLand/Kernel/include/vfs_ext.h
index
8cabfa1
..
2cd4101
100644
(file)
--- a/
KernelLand/Kernel/include/vfs_ext.h
+++ b/
KernelLand/Kernel/include/vfs_ext.h
@@
-13,6
+13,8
@@
typedef Uint64 tInode;
typedef Uint32 tMount;
// === CONSTANTS ===
typedef Uint32 tMount;
// === CONSTANTS ===
+//! Maximum length of a filename (including NULL byte)
+#define FILENAME_MAX 256
//! Maximum size of a Memory Path generated by VFS_GetMemPath
#define VFS_MEMPATH_SIZE (3 + (BITS/4)*2)
/**
//! Maximum size of a Memory Path generated by VFS_GetMemPath
#define VFS_MEMPATH_SIZE (3 + (BITS/4)*2)
/**
@@
-114,14
+116,16
@@
enum eVFS_SeekDirs
*/
typedef struct sVFS_ACL
{
*/
typedef struct sVFS_ACL
{
+ //! ACL entity selection
struct {
unsigned Group: 1; //!< Group (as opposed to user) flag
unsigned ID: 31; //!< ID of Group/User (-1 for nobody/world)
struct {
unsigned Group: 1; //!< Group (as opposed to user) flag
unsigned ID: 31; //!< ID of Group/User (-1 for nobody/world)
- };
+ } Ent;
+ //! ACL Permissions mask
struct {
unsigned Inv: 1; //!< Invert Permissions
unsigned Perms: 31; //!< Permission Flags
struct {
unsigned Inv: 1; //!< Invert Permissions
unsigned Perms: 31; //!< Permission Flags
- };
+ }
Perm
;
} tVFS_ACL;
/**
} tVFS_ACL;
/**
@@
-142,6
+146,10
@@
typedef struct sFInfo
tVFS_ACL acls[]; //!< ACL buffer (size is passed in the \a MaxACLs argument to VFS_FInfo)
} PACKED tFInfo;
tVFS_ACL acls[]; //!< ACL buffer (size is passed in the \a MaxACLs argument to VFS_FInfo)
} PACKED tFInfo;
+// --- fd_set --
+#include "../../../Usermode/Libraries/ld-acess.so_src/include_exp/acess/fd_set.h"
+
+#if 0
/**
* \brief fd_set for select()
*/
/**
* \brief fd_set for select()
*/
@@
-169,6
+177,7
@@
typedef struct
* \param fdsetp Set to modify
*/
#define FD_ISSET(fd, fdsetp) ((fdsetp)->flags[(fd)/16]&(1<<((fd)%16)))
* \param fdsetp Set to modify
*/
#define FD_ISSET(fd, fdsetp) ((fdsetp)->flags[(fd)/16]&(1<<((fd)%16)))
+#endif
// === FUNCTIONS ===
/**
// === FUNCTIONS ===
/**
@@
-276,7
+285,7
@@
extern Uint64 VFS_Tell(int FD);
* \param Buffer Destination of read data
* \return Number of read bytes
*/
* \param Buffer Destination of read data
* \return Number of read bytes
*/
-extern
Uint64 VFS_Read(int FD, Uint64
Length, void *Buffer);
+extern
size_t VFS_Read(int FD, size_t
Length, void *Buffer);
/**
* \brief Writes data to a file
* \param FD File handle returned by ::VFS_Open
/**
* \brief Writes data to a file
* \param FD File handle returned by ::VFS_Open
@@
-284,7
+293,7
@@
extern Uint64 VFS_Read(int FD, Uint64 Length, void *Buffer);
* \param Buffer Source of written data
* \return Number of bytes written
*/
* \param Buffer Source of written data
* \return Number of bytes written
*/
-extern
Uint64 VFS_Write(int FD, Uint64
Length, const void *Buffer);
+extern
size_t VFS_Write(int FD, size_t
Length, const void *Buffer);
/**
* \brief Reads from a specific offset in the file
/**
* \brief Reads from a specific offset in the file
@@
-294,7
+303,7
@@
extern Uint64 VFS_Write(int FD, Uint64 Length, const void *Buffer);
* \param Buffer Source of read data
* \return Number of bytes read
*/
* \param Buffer Source of read data
* \return Number of bytes read
*/
-extern
Uint64 VFS_ReadAt(int FD, Uint64 Offset, Uint64
Length, void *Buffer);
+extern
size_t VFS_ReadAt(int FD, Uint64 Offset, size_t
Length, void *Buffer);
/**
* \brief Writes to a specific offset in the file
* \param FD File handle returned by ::VFS_Open
/**
* \brief Writes to a specific offset in the file
* \param FD File handle returned by ::VFS_Open
@@
-303,7
+312,7
@@
extern Uint64 VFS_ReadAt(int FD, Uint64 Offset, Uint64 Length, void *Buffer);
* \param Buffer Source of written data
* \return Number of bytes written
*/
* \param Buffer Source of written data
* \return Number of bytes written
*/
-extern
Uint64 VFS_WriteAt(int FD, Uint64 Offset, Uint64
Length, const void *Buffer);
+extern
size_t VFS_WriteAt(int FD, Uint64 Offset, size_t
Length, const void *Buffer);
/**
* \brief Sends an IOCtl request to the driver
/**
* \brief Sends an IOCtl request to the driver
@@
-368,10
+377,10
@@
extern int VFS_Symlink(const char *Name, const char *Link);
/**
* \brief Read from a directory
* \param FD File handle returned by ::VFS_Open
/**
* \brief Read from a directory
* \param FD File handle returned by ::VFS_Open
- * \param Dest Destination array for the file name (max
255
bytes)
+ * \param Dest Destination array for the file name (max
FILENAME_MAX
bytes)
* \return Boolean Success
*/
* \return Boolean Success
*/
-extern int VFS_ReadDir(int FD, char
*Dest
);
+extern int VFS_ReadDir(int FD, char
Dest[FILENAME_MAX]
);
/**
* \brief Wait for an aciton on a file descriptor
* \param MaxHandle Maximum set handle in \a *Handles
/**
* \brief Wait for an aciton on a file descriptor
* \param MaxHandle Maximum set handle in \a *Handles
UCC
git Repository :: git.ucc.asn.au