00001
00008
00009
00010
00011
00012 #ifndef __L4VFS_INCLUDE_TYPES_H_
00013 #define __L4VFS_INCLUDE_TYPES_H_
00014
00015 #include <l4/sys/types.h>
00016
00017 #include <l4/l4vfs/volume_ids.h>
00018 #include <l4/l4vfs/comm_defs.h>
00019
00020 #define true 1
00021 #define false 0
00022
00023
00024 #define MAX_FILES_OPEN 1024
00026 #define L4VFS_ILLEGAL_OBJECT_NAME_CHARS "/:"
00027 #define L4VFS_ROOT_OBJECT_ID 0
00028 #define L4VFS_MAX_NAME 255
00029 #define L4VFS_PATH_SEPARATOR '/'
00030 #define L4VFS_PATH_PARENT ".."
00031 #define L4VFS_PATH_IDENTITY '.'
00033 #define SELECT_READ 1
00034 #define SELECT_WRITE 2
00035 #define SELECT_EXCEPTION 4
00037 #define L4VFS_ILLEGAL_OBJECT_ID -1
00038 #define L4VFS_ILLEGAL_VOLUME_ID -1
00040 typedef l4_int32_t volume_id_t;
00041 typedef l4_int32_t local_object_id_t;
00042 typedef l4_int32_t object_handle_t;
00043
00044 typedef l4_int32_t l4vfs_off_t;
00045 typedef l4_int32_t l4vfs_ssize_t;
00046 typedef l4_uint32_t l4vfs_size_t;
00047 typedef l4_uint32_t l4vfs_socklen_t;
00048 typedef l4_uint32_t l4vfs_mode_t;
00049 typedef l4_int32_t l4vfs_time_t;
00050
00051 typedef l4_uint32_t l4vfs_blkcnt_t;
00052 typedef l4_uint32_t l4vfs_blksize_t;
00053 typedef l4_uint16_t l4vfs_nlink_t;
00054
00055 typedef l4_uint16_t l4vfs_dev_t;
00056 typedef l4_uint16_t l4vfs_gid_t;
00057 typedef l4_uint16_t l4vfs_uid_t;
00058
00059 typedef struct l4vfs_dirent
00060 {
00061 local_object_id_t d_ino;
00062 l4vfs_off_t d_off;
00063 l4_uint16_t d_reclen;
00064 #ifdef USE_UCLIBC
00065 unsigned char d_type;
00066 #elif defined(USE_DIETLIBC)
00067 #endif
00068 char d_name[L4VFS_MAX_NAME + 1];
00069 } l4vfs_dirent_t;
00070
00071 typedef struct l4vfs_stat
00072 {
00073 volume_id_t st_dev;
00074 local_object_id_t st_ino;
00075 l4vfs_mode_t st_mode;
00076 l4vfs_nlink_t st_nlink;
00077 l4vfs_uid_t st_uid;
00078 l4vfs_gid_t st_gid;
00079 l4vfs_dev_t st_rdev;
00080 l4vfs_off_t st_size;
00081 l4vfs_blksize_t st_blksize;
00082 l4vfs_blkcnt_t st_blocks;
00083 l4vfs_time_t st_atime;
00084 l4vfs_time_t st_mtime;
00085 l4vfs_time_t st_ctime;
00086 } l4vfs_stat_t;
00087
00098 typedef struct
00099 {
00100 volume_id_t volume_id;
00101 local_object_id_t object_id;
00102 } object_id_t;
00103
00114 typedef struct
00115 {
00116 l4_threadid_t server_id;
00117 object_handle_t object_handle;
00118 object_id_t object_id;
00119 void * user_data;
00121 } file_desc_t;
00122
00123 #endif