chiche.h File Reference

#include <libc.h>
#include <libide.h>
#include <libpart.h>
#include <libtimer.h>

Go to the source code of this file.

Data Structures

struct  s_chiche_link
struct  s_chiche_direntry
struct  s_chiche_super
struct  s_chiche_cce
struct  s_chiche_dirupdate
struct  s_chiche
struct  s_chiche_fde
struct  s_chiche_common

Defines

#define CHICHE_H   1
#define BLKSZ   512
#define CHICHE_UNUSED_ENTRIES   2
#define CHICHE_UNUSED   0x00
#define CHICHE_EOL   0x01
#define CHICHE_VERSION   1
#define CHICHE_START   2
#define CHICHE_BLKSZ   512
#define CHICHE_BPC   1
#define CHICHE_CLUSTERSZ   (CHICHE_BPC * CHICHE_BLKSZ)
#define CHICHE_ENTRYSZ   sizeof(u_int32_t)
#define CHICHE_MAGIC   0xb00ba
#define CHICHE_RESERVED   0x10
#define CHICHE_CCACHESZ   8
#define CHICHE_MNGBLKS   2
#define CHICHE_SUPERBLK   1
#define CHICHE_FAT   2
#define CHICHE_RDENT   0
#define CHICHE_NAMESZ   31
#define CHICHE_DOTDOT   ".."
#define CHICHE_DOT   "."
#define CHICHE_ACCESS_MODE   0777
#define CHICHE_NOFLAG   0x0
#define CHICHE_FOLLOW_LINK   0x1
#define CHICHE_ACCESS   0x2
#define CHICHE_RESTORE   1
#define CHICHE_NOFLAGS   0x0
#define CHICHE_ALLOC_CLUSTER   0x1
#define CHICHE_SYSCALLS   (1 << 0)
#define CHICHE_MISC   (1 << 1)
#define CHICHE_USH   (1 << 2)
#define CHICHE_RELEASE   (1 << 3)
#define CHICHE_STEP   (1 << 4)
#define CHICHE_DEBUG   (CHICHE_RELEASE)
#define CHICHE_FDTABSZ   1024
#define CHICHE_PSC   "/"
#define CHICHE_POLL_UNUSED   0x00
#define CHICHE_POLL_EOL   0x01
#define CHICHE_POLL_VALID   0x02
#define CHICHE_POLL_ERROR   0x03
#define CHICHE_FSTYPE   0xcd
#define CHICHE_ATTR_FILE   0x00000001
#define CHICHE_ATTR_DIR   0x00000002
#define CHICHE_ATTR_LINK   0x00000004
#define CHICHE_ATTR_ROOT   0x00000010
#define CHICHE_ATTR_SUID   0x00000020
#define CHICHE_ATTR_SGID   0x00000040
#define CHICHE_ATTR_STICKY   0x00000080
#define CHICHE_ATTR_UW   0x00000100
#define CHICHE_ATTR_UR   0x00000200
#define CHICHE_ATTR_UX   0x00000400
#define CHICHE_ATTR_GW   0x00000800
#define CHICHE_ATTR_GR   0x00001000
#define CHICHE_ATTR_GX   0x00002000
#define CHICHE_ATTR_OW   0x00004000
#define CHICHE_ATTR_OR   0x00008000
#define CHICHE_ATTR_OX   0x00001000
#define CHICHE_ROOT_ATTRIBUTES

Typedefs

typedef char ** t_path
typedef s_chiche_link t_chiche_link
typedef s_chiche_direntry t_chiche_direntry
typedef s_chiche_super t_chiche_super
typedef s_chiche_cce t_chiche_cce
typedef s_chiche_dirupdate t_chiche_dirupdate
typedef s_chiche t_chiche
typedef s_chiche_fde t_chiche_fde
typedef s_chiche_common t_chiche_common

Functions

int chiche_init_srv (void)
void chiche_waitfor_service (int gate)
int main (int argc, char **argv)
int chiche_cache_read (t_chiche *chiche, u_int32_t dev, u_int32_t addr, void *buffer, u_int32_t nblocks)
void chiche_cache_write (t_chiche *chiche, u_int32_t addr, void *buffer, u_int32_t nblocks)
int chiche_read (t_chiche *chiche, u_int32_t dev, u_int32_t block, u_int32_t off, void *data, u_int32_t bytes)
int chiche_write (t_chiche *chiche, u_int32_t dev, u_int32_t block, u_int32_t off, void *data, u_int32_t bytes, int restore)
int chiche_write_super (t_chiche *chiche)
int chiche_read_super (t_chiche *chiche)
u_int32_t chiche_nxt_cluster (t_chiche *chiche, u_int32_t cluster)
int chiche_poll_directory (t_chiche *chiche, t_chiche_direntry *direntry, u_int32_t *root, int *no)
int chiche_mkfs (t_chiche *chiche)
void chiche_dump_superblock (t_chiche_super *super)
u_int32_t chiche_pathsz (t_path path)
t_path chiche_reserve_path (t_chiche *chiche, char *upath, char *psc)
void chiche_release_path (t_chiche *chiche, t_path path)
void chiche_dump_path (t_chiche *chiche, t_path path)
void chiche_dump_cce (t_chiche *chiche, t_chiche_cce *cce)
int chiche_mount (t_chiche *chiche)
u_int32_t chiche_find_free_cluster (t_chiche *chiche)
int chiche_set_fat_entry (t_chiche *chiche, u_int32_t cluster, u_int32_t set)
void chiche_dump_direntry (t_chiche *chiche, t_chiche_direntry *direntry)
int chiche_fill_root_direntry (t_chiche *chiche, t_chiche_direntry *direntry)
int chiche_dir_from_path (t_chiche *chiche, t_path path, t_chiche_direntry *dir, t_chiche_dirupdate *du)
void chiche_set_mode (t_chiche *chiche, u_int32_t *attr, mode_t mode, u_int32_t more)
u_int32_t chiche_dirsz (t_chiche *chiche, int fd)
int chiche_new_direntry (t_chiche *chiche, t_path path, mode_t mode, u_int32_t attr, int flags)
int chiche_mkfile (t_chiche *chiche, char *upath, mode_t mode, int flags)
int chiche_mkdir (t_chiche *chiche, char *upath, mode_t mode)
int chiche_mksymlink (t_chiche *chiche, char *upath, mode_t mode)
int chiche_is_fde_valid (t_chiche *chiche, int fd)
void chiche_fill_fde (t_chiche *chiche, t_chiche_direntry *direntry, u_int32_t root, u_int32_t no, int fd)
int chiche_open (t_chiche *chiche, int fd, char *upath, int flags, int chflags)
int chiche_reserve_fde (t_chiche *chiche)
void chiche_release_fde (t_chiche *chiche, int fd)
int chiche_fstat (t_chiche *chiche, int fd, struct stat *stat)
int chiche_getdents (t_chiche *chiche, int fd, void *data, u_int32_t *nbytes)
int chiche_fchmod (t_chiche *chiche, int fd, mode_t mode)
int chiche_resize_dir (t_chiche *chiche, t_chiche_direntry *dir)
int chiche_clean_direntry (t_chiche *chiche, t_chiche_direntry *direntry)
int chiche_rename (t_chiche *chiche, char *uoldpath, int fd, char *unewpath)
int chiche_unlink (t_chiche *chiche, char *upath, int fd)
int chiche_rmdir (t_chiche *chiche, char *upath, int fd)
int chiche_exists (t_chiche *chiche, char *upath)
int chiche_append (t_chiche *chiche, int fd)
void sys_chiche_rename (t_tcb *caller_tcb)
void sys_chiche_fchmod (t_tcb *caller_tcb)
void sys_chiche_chmod (t_tcb *caller_tcb)
void sys_chiche_getdents (t_tcb *caller_tcb)
void sys_chiche_stat (t_tcb *caller_tcb)
void sys_chiche_fstat (t_tcb *caller_tcb)
void sys_chiche_close (t_tcb *caller_tcb)
void sys_chiche_open (t_tcb *caller_tcb)
void sys_chiche_unlink (t_tcb *caller_tcb)
void sys_chiche_rmdir (t_tcb *caller_tcb)
void sys_chiche_mkdir (t_tcb *caller_tcb)
void sys_chiche_umount (t_tcb *caller_tcb)
void sys_chiche_mount (t_tcb *caller_tcb)
void sys_chiche_mkfs (t_tcb *caller_tcb)
void sys_chiche_init (t_tcb *caller_tcb)
void do_sys_chiche (void)
void sys_chiche (void)


Define Documentation

#define BLKSZ   512
 

#define CHICHE_ACCESS   0x2
 

#define CHICHE_ACCESS_MODE   0777
 

#define CHICHE_ALLOC_CLUSTER   0x1
 

#define CHICHE_ATTR_DIR   0x00000002
 

#define CHICHE_ATTR_FILE   0x00000001
 

#define CHICHE_ATTR_GR   0x00001000
 

#define CHICHE_ATTR_GW   0x00000800
 

#define CHICHE_ATTR_GX   0x00002000
 

#define CHICHE_ATTR_LINK   0x00000004
 

#define CHICHE_ATTR_OR   0x00008000
 

#define CHICHE_ATTR_OW   0x00004000
 

#define CHICHE_ATTR_OX   0x00001000
 

#define CHICHE_ATTR_ROOT   0x00000010
 

#define CHICHE_ATTR_SGID   0x00000040
 

#define CHICHE_ATTR_STICKY   0x00000080
 

#define CHICHE_ATTR_SUID   0x00000020
 

#define CHICHE_ATTR_UR   0x00000200
 

#define CHICHE_ATTR_UW   0x00000100
 

#define CHICHE_ATTR_UX   0x00000400
 

#define CHICHE_BLKSZ   512
 

#define CHICHE_BPC   1
 

#define CHICHE_CCACHESZ   8
 

#define CHICHE_CLUSTERSZ   (CHICHE_BPC * CHICHE_BLKSZ)
 

#define CHICHE_DEBUG   (CHICHE_RELEASE)
 

#define CHICHE_DOT   "."
 

#define CHICHE_DOTDOT   ".."
 

#define CHICHE_ENTRYSZ   sizeof(u_int32_t)
 

#define CHICHE_EOL   0x01
 

#define CHICHE_FAT   2
 

#define CHICHE_FDTABSZ   1024
 

#define CHICHE_FOLLOW_LINK   0x1
 

#define CHICHE_FSTYPE   0xcd
 

#define CHICHE_H   1
 

#define CHICHE_MAGIC   0xb00ba
 

#define CHICHE_MISC   (1 << 1)
 

#define CHICHE_MNGBLKS   2
 

#define CHICHE_NAMESZ   31
 

#define CHICHE_NOFLAG   0x0
 

#define CHICHE_NOFLAGS   0x0
 

#define CHICHE_POLL_EOL   0x01
 

#define CHICHE_POLL_ERROR   0x03
 

#define CHICHE_POLL_UNUSED   0x00
 

#define CHICHE_POLL_VALID   0x02
 

#define CHICHE_PSC   "/"
 

#define CHICHE_RDENT   0
 

#define CHICHE_RELEASE   (1 << 3)
 

#define CHICHE_RESERVED   0x10
 

#define CHICHE_RESTORE   1
 

#define CHICHE_ROOT_ATTRIBUTES
 

Value:

#define CHICHE_START   2
 

#define CHICHE_STEP   (1 << 4)
 

#define CHICHE_SUPERBLK   1
 

#define CHICHE_SYSCALLS   (1 << 0)
 

#define CHICHE_UNUSED   0x00
 

#define CHICHE_UNUSED_ENTRIES   2
 

#define CHICHE_USH   (1 << 2)
 

#define CHICHE_VERSION   1
 


Typedef Documentation

typedef struct s_chiche t_chiche
 

typedef struct s_chiche_cce t_chiche_cce
 

typedef struct s_chiche_common t_chiche_common
 

typedef struct s_chiche_direntry t_chiche_direntry
 

typedef struct s_chiche_dirupdate t_chiche_dirupdate
 

typedef struct s_chiche_fde t_chiche_fde
 

typedef struct s_chiche_link t_chiche_link
 

typedef struct s_chiche_super t_chiche_super
 

typedef char** t_path
 


Function Documentation

int chiche_append t_chiche chiche,
int  fd
 

int chiche_cache_read t_chiche chiche,
u_int32_t  dev,
u_int32_t  addr,
void *  buffer,
u_int32_t  nblocks
 

void chiche_cache_write t_chiche chiche,
u_int32_t  addr,
void *  buffer,
u_int32_t  nblocks
 

int chiche_clean_direntry t_chiche chiche,
t_chiche_direntry direntry
 

int chiche_dir_from_path t_chiche chiche,
t_path  path,
t_chiche_direntry dir,
t_chiche_dirupdate du
 

u_int32_t chiche_dirsz t_chiche chiche,
int  fd
 

void chiche_dump_cce t_chiche chiche,
t_chiche_cce cce
 

void chiche_dump_direntry t_chiche chiche,
t_chiche_direntry direntry
 

void chiche_dump_path t_chiche chiche,
t_path  path
 

void chiche_dump_superblock t_chiche_super super  ) 
 

int chiche_exists t_chiche chiche,
char *  upath
 

int chiche_fchmod t_chiche chiche,
int  fd,
mode_t  mode
 

void chiche_fill_fde t_chiche chiche,
t_chiche_direntry direntry,
u_int32_t  root,
u_int32_t  no,
int  fd
 

int chiche_fill_root_direntry t_chiche chiche,
t_chiche_direntry direntry
 

u_int32_t chiche_find_free_cluster t_chiche chiche  ) 
 

int chiche_fstat t_chiche chiche,
int  fd,
struct stat stat
 

int chiche_getdents t_chiche chiche,
int  fd,
void *  data,
u_int32_t nbytes
 

int chiche_init_srv void   ) 
 

int chiche_is_fde_valid t_chiche chiche,
int  fd
 

int chiche_mkdir t_chiche chiche,
char *  upath,
mode_t  mode
 

int chiche_mkfile t_chiche chiche,
char *  upath,
mode_t  mode,
int  flags
 

int chiche_mkfs t_chiche chiche  ) 
 

int chiche_mksymlink t_chiche chiche,
char *  upath,
mode_t  mode
 

int chiche_mount t_chiche chiche  ) 
 

int chiche_new_direntry t_chiche chiche,
t_path  path,
mode_t  mode,
u_int32_t  attr,
int  flags
 

u_int32_t chiche_nxt_cluster t_chiche chiche,
u_int32_t  cluster
 

int chiche_open t_chiche chiche,
int  fd,
char *  upath,
int  flags,
int  chflags
 

u_int32_t chiche_pathsz t_path  path  ) 
 

int chiche_poll_directory t_chiche chiche,
t_chiche_direntry direntry,
u_int32_t root,
int *  no
 

int chiche_read t_chiche chiche,
u_int32_t  dev,
u_int32_t  block,
u_int32_t  off,
void *  data,
u_int32_t  bytes
 

int chiche_read_super t_chiche chiche  ) 
 

void chiche_release_fde t_chiche chiche,
int  fd
 

void chiche_release_path t_chiche chiche,
t_path  path
 

int chiche_rename t_chiche chiche,
char *  uoldpath,
int  fd,
char *  unewpath
 

int chiche_reserve_fde t_chiche chiche  ) 
 

t_path chiche_reserve_path t_chiche chiche,
char *  upath,
char *  psc
 

int chiche_resize_dir t_chiche chiche,
t_chiche_direntry dir
 

int chiche_rmdir t_chiche chiche,
char *  upath,
int  fd
 

int chiche_set_fat_entry t_chiche chiche,
u_int32_t  cluster,
u_int32_t  set
 

void chiche_set_mode t_chiche chiche,
u_int32_t attr,
mode_t  mode,
u_int32_t  more
 

int chiche_unlink t_chiche chiche,
char *  upath,
int  fd
 

void chiche_waitfor_service int  gate  ) 
 

int chiche_write t_chiche chiche,
u_int32_t  dev,
u_int32_t  block,
u_int32_t  off,
void *  data,
u_int32_t  bytes,
int  restore
 

int chiche_write_super t_chiche chiche  ) 
 

void do_sys_chiche void   ) 
 

int main int  argc,
char **  argv
 

void sys_chiche void   ) 
 

void sys_chiche_chmod t_tcb caller_tcb  ) 
 

void sys_chiche_close t_tcb caller_tcb  ) 
 

void sys_chiche_fchmod t_tcb caller_tcb  ) 
 

void sys_chiche_fstat t_tcb caller_tcb  ) 
 

void sys_chiche_getdents t_tcb caller_tcb  ) 
 

void sys_chiche_init t_tcb caller_tcb  ) 
 

void sys_chiche_mkdir t_tcb caller_tcb  ) 
 

void sys_chiche_mkfs t_tcb caller_tcb  ) 
 

void sys_chiche_mount t_tcb caller_tcb  ) 
 

void sys_chiche_open t_tcb caller_tcb  ) 
 

void sys_chiche_rename t_tcb caller_tcb  ) 
 

void sys_chiche_rmdir t_tcb caller_tcb  ) 
 

void sys_chiche_stat t_tcb caller_tcb  ) 
 

void sys_chiche_umount t_tcb caller_tcb  ) 
 

void sys_chiche_unlink t_tcb caller_tcb  ) 
 


Generated on Wed May 24 23:06:02 2006 for LSE/OS by  doxygen 1.4.6