XINU
Data Structures | Macros | Variables
lfilesys.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ldentry
 
struct  lfdata
 
struct  lfdbfree
 
struct  lfdir
 
struct  lfiblk
 
struct  lflcblk
 

Macros

#define ib2disp(ib)   (((ib)%7)*sizeof(struct lfiblk))
 
#define ib2sect(ib)   (((ib)/7)+LF_AREA_IB)
 
#define LF_AREA_DIR   0 /* First sector of directory */
 
#define LF_AREA_IB   1 /* First sector of i-blocks */
 
#define LF_BLKSIZ   512 /* Assumes 512-byte disk blocks */
 
#define LF_CTL_DEL   F_CTL_DEL /* Delete a file */
 
#define LF_CTL_SIZE   F_CTL_SIZE /* Obtain the size of a file */
 
#define LF_CTL_TRUNC   F_CTL_TRUNC /* Truncate a file */
 
#define LF_DISK_DEV   SYSERR
 
#define LF_DMASK   0x000001ff /* Mask for the data in a data */
 
#define LF_DNULL   (dbid32) -1 /* Data block null pointer */
 
#define LF_FREE   0 /* Slave device is available */
 
#define LF_IBLEN   16 /* Data block ptrs per i-block */
 
#define LF_IDATA   8192 /* Bytes of data indexed by a */
 
#define LF_IMASK   0x00001fff /* Mask for the data indexed by */
 
#define LF_INULL   (ibid32) -1 /* Index block null pointer */
 
#define LF_MODE_N   F_MODE_N /* Mode bit for "new" */
 
#define LF_MODE_O   F_MODE_O /* Mode bit for "old" */
 
#define LF_MODE_R   F_MODE_R /* Mode bit for "read" */
 
#define LF_MODE_RW   F_MODE_RW /* Mode bits for "read or write"*/
 
#define LF_MODE_W   F_MODE_W /* Mode bit for "write" */
 
#define LF_NAME_LEN   16 /* Length of name plus null */
 
#define LF_NUM_DIR_ENT   20 /* Num. of files in a directory */
 
#define LF_USED   1 /* Slave device is in use */
 
#define LFS_ID   0x58696E75 /* ID for Xinu Local File System*/
 

Variables

struct lfdata Lf_data
 
struct lflcblk lfltab []
 

Macro Definition Documentation

◆ ib2disp

#define ib2disp (   ib)    (((ib)%7)*sizeof(struct lfiblk))

Definition at line 91 of file lfilesys.h.

Referenced by lfibget(), and lfibput().

◆ ib2sect

#define ib2sect (   ib)    (((ib)/7)+LF_AREA_IB)

Definition at line 86 of file lfilesys.h.

Referenced by lfibget(), and lfibput().

◆ LF_AREA_DIR

#define LF_AREA_DIR   0 /* First sector of directory */

Definition at line 67 of file lfilesys.h.

Referenced by lfdballoc(), lfdbfree(), lfflush(), lfiballoc(), lfsckfmt(), lfscreate(), lfsopen(), and xsh_ls().

◆ LF_AREA_IB

#define LF_AREA_IB   1 /* First sector of i-blocks */

Definition at line 66 of file lfilesys.h.

◆ LF_BLKSIZ

#define LF_BLKSIZ   512 /* Assumes 512-byte disk blocks */

◆ LF_CTL_DEL

#define LF_CTL_DEL   F_CTL_DEL /* Delete a file */

Definition at line 174 of file lfilesys.h.

◆ LF_CTL_SIZE

#define LF_CTL_SIZE   F_CTL_SIZE /* Obtain the size of a file */

Definition at line 176 of file lfilesys.h.

◆ LF_CTL_TRUNC

#define LF_CTL_TRUNC   F_CTL_TRUNC /* Truncate a file */

Definition at line 175 of file lfilesys.h.

Referenced by lflcontrol().

◆ LF_DISK_DEV

#define LF_DISK_DEV   SYSERR

Definition at line 39 of file lfilesys.h.

◆ LF_DMASK

#define LF_DMASK   0x000001ff /* Mask for the data in a data */

Definition at line 63 of file lfilesys.h.

Referenced by lfsetup().

◆ LF_DNULL

#define LF_DNULL   (dbid32) -1 /* Data block null pointer */

Definition at line 56 of file lfilesys.h.

Referenced by lfdballoc(), lfibclear(), lfsckfmt(), lfscreate(), lfsetup(), lfsopen(), and lftruncate().

◆ LF_FREE

#define LF_FREE   0 /* Slave device is available */

Definition at line 52 of file lfilesys.h.

Referenced by lfflush(), lflclose(), lflinit(), and lfsopen().

◆ LF_IBLEN

#define LF_IBLEN   16 /* Data block ptrs per i-block */

Definition at line 57 of file lfilesys.h.

Referenced by lfibclear(), and lftruncate().

◆ LF_IDATA

#define LF_IDATA   8192 /* Bytes of data indexed by a */

Definition at line 58 of file lfilesys.h.

Referenced by lfsetup().

◆ LF_IMASK

#define LF_IMASK   0x00001fff /* Mask for the data indexed by */

Definition at line 60 of file lfilesys.h.

Referenced by lfsetup().

◆ LF_INULL

#define LF_INULL   (ibid32) -1 /* Index block null pointer */

Definition at line 55 of file lfilesys.h.

Referenced by lfiballoc(), lfibclear(), lflinit(), lfsckfmt(), lfscreate(), lfsetup(), lfsopen(), and lftruncate().

◆ LF_MODE_N

#define LF_MODE_N   F_MODE_N /* Mode bit for "new" */

Definition at line 46 of file lfilesys.h.

Referenced by lfgetmode(), and lfsopen().

◆ LF_MODE_O

#define LF_MODE_O   F_MODE_O /* Mode bit for "old" */

Definition at line 45 of file lfilesys.h.

Referenced by lfgetmode(), and lfsopen().

◆ LF_MODE_R

#define LF_MODE_R   F_MODE_R /* Mode bit for "read" */

Definition at line 42 of file lfilesys.h.

Referenced by lfgetmode().

◆ LF_MODE_RW

#define LF_MODE_RW   F_MODE_RW /* Mode bits for "read or write"*/

Definition at line 44 of file lfilesys.h.

Referenced by lfgetmode(), and lfsopen().

◆ LF_MODE_W

#define LF_MODE_W   F_MODE_W /* Mode bit for "write" */

Definition at line 43 of file lfilesys.h.

Referenced by lfgetmode().

◆ LF_NAME_LEN

#define LF_NAME_LEN   16 /* Length of name plus null */

Definition at line 49 of file lfilesys.h.

Referenced by lflinit(), and lfsopen().

◆ LF_NUM_DIR_ENT

#define LF_NUM_DIR_ENT   20 /* Num. of files in a directory */

Definition at line 50 of file lfilesys.h.

Referenced by lfsopen().

◆ LF_USED

#define LF_USED   1 /* Slave device is in use */

Definition at line 53 of file lfilesys.h.

Referenced by lflclose(), lflcontrol(), lflgetc(), lflputc(), lflseek(), and lfsopen().

◆ LFS_ID

#define LFS_ID   0x58696E75 /* ID for Xinu Local File System*/

Definition at line 80 of file lfilesys.h.

Referenced by lfscheck(), and lfscreate().

Variable Documentation

◆ Lf_data

struct lfdata Lf_data

◆ lfltab

struct lflcblk lfltab[]

Definition at line 5 of file lflinit.c.

Referenced by lflclose(), lflcontrol(), lflgetc(), lflinit(), lflputc(), lflseek(), and lfsopen().