⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cformat.h

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 H
字号:
/* *  format of cache on disk */typedef struct Dptr	Dptr;typedef struct Dahdr	Dahdr;typedef struct Dalloc	Dalloc;typedef struct Fphdr	Fphdr;typedef struct Fptr	Fptr;typedef struct Inode	Inode;typedef struct Dihdr	Dihdr;typedef struct Dinode	Dinode;enum{	Amagic= 		0xbebedded,	/* allocation block magic */	Imagic=		0xbadc0c0a,	/* inode block magic */	BtoUL=		8*sizeof(ulong),/* bits in a ulong */	KNAMELEN=	28	/* old NAMELEN: BUG */};#define	Indbno		0x80000000	/* indirect block */#define	Notabno		0xFFFFFFFF	/* not a block number *//* *  Allocation blocks at the begining of the disk.  There are *  enough of these blocks to supply 1 bit for each block on the *  disk; */struct Dahdr{	ulong	magic;	ulong	bsize;		/* logical block size */	char	name[KNAMELEN];	short	nab;		/* number of allocation blocks */};struct Dalloc{	Dahdr;	ulong	bits[1];};/* *  A pointer to disk data */struct Dptr{	ulong	fbno;		/* file block number */	ulong	bno;		/* disk block number */	ushort	start;		/* offset into block of valid data */	ushort	end;		/* offset into block after valid data */};/* *  A file descriptor. */struct Inode{	Qid		qid;	vlong	length;	Dptr		ptr;		/* pointer page */		char		inuse;};/* *  inode blocks (after allocation blocks) */struct Dihdr{	ulong	magic;	ulong	nino;		/* number of inodes */};struct Dinode{	Dihdr;	Inode	inode[1];};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -