vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

kfs.h (861B)


      1 typedef struct Qid9p1 Qid9p1;
      2 typedef struct Dentry Dentry;
      3 typedef struct Kfsfile Kfsfile;
      4 typedef struct Kfs Kfs;
      5 
      6 /* DONT TOUCH, this is the disk structure */
      7 struct	Qid9p1
      8 {
      9 	long	path;
     10 	long	version;
     11 };
     12 
     13 #define	NAMELEN		28		/* size of names */
     14 #define	NDBLOCK		6		/* number of direct blocks in Dentry */
     15 
     16 /* DONT TOUCH, this is the disk structure */
     17 struct	Dentry
     18 {
     19 	char	name[NAMELEN];
     20 	short	uid;
     21 	short	gid;
     22 	ushort	mode;
     23 /*
     24 		#define	DALLOC	0x8000
     25 		#define	DDIR	0x4000
     26 		#define	DAPND	0x2000
     27 		#define	DLOCK	0x1000
     28 		#define	DREAD	0x4
     29 		#define	DWRITE	0x2
     30 		#define	DEXEC	0x1
     31 */
     32 	Qid9p1	qid;
     33 	long	size;
     34 	long	dblock[NDBLOCK];
     35 	long	iblock;
     36 	long	diblock;
     37 	long	atime;
     38 	long	mtime;
     39 };
     40 
     41 struct Kfsfile
     42 {
     43 	Dentry _;
     44 	long off;
     45 };
     46 
     47 struct Kfs
     48 {
     49 	int	RBUFSIZE;
     50 	int	BUFSIZE;
     51 	int	DIRPERBUF;
     52 	int	INDPERBUF;
     53 	int	INDPERBUF2;
     54 };
     55 
     56 extern int kfsinit(Fs*);
     57