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

📄 dat.h

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 H
字号:
typedef	struct Ioclust	Ioclust;typedef	struct Iobuf	Iobuf;typedef	struct Isofile	Isofile;typedef struct Xdata	Xdata;typedef struct Xfile	Xfile;typedef struct Xfs	Xfs;typedef struct Xfsub	Xfsub;#pragma incomplete Isofileenum{	Sectorsize = 2048,	Maxname = 256,};struct Iobuf{	Ioclust*	clust;	long	addr;	uchar*	iobuf;};struct Ioclust{	long	addr;	Xdata*	dev;	Ioclust*	next;	Ioclust*	prev;	int	busy;	int	nbuf;	Iobuf*	buf;	uchar*	iobuf;};struct Xdata{	Xdata*	next;	char*	name;		/* of underlying file */	Qid	qid;	short	type;	short	fdev;	int	ref;		/* attach count */	int	dev;		/* for read/write */};struct Xfsub{	void	(*reset)(void);	int	(*attach)(Xfile*);	void	(*clone)(Xfile*, Xfile*);	void	(*walkup)(Xfile*);	void	(*walk)(Xfile*, char*);	void	(*open)(Xfile*, int);	void	(*create)(Xfile*, char*, long, int);	long	(*readdir)(Xfile*, uchar*, long, long);	long	(*read)(Xfile*, char*, long, long);	long	(*write)(Xfile*, char*, long, long);	void	(*clunk)(Xfile*);	void	(*remove)(Xfile*);	void	(*stat)(Xfile*, Dir*);	void	(*wstat)(Xfile*, Dir*);};struct Xfs{	Xdata*	d;		/* how to get the bits */	Xfsub*	s;		/* how to use them */	int	ref;	int	issusp;	/* follows system use sharing protocol */	long	suspoff;	/* if so, offset at which SUSP area begins */	int	isrock;	/* Rock Ridge format */	int	isplan9;	/* has Plan 9-specific directory info */	Qid	rootqid;	Isofile*	ptr;		/* private data */};struct Xfile{	Xfile*	next;		/* in fid hash bucket */	Xfs*	xf;	long	fid;	ulong	flags;	Qid	qid;	int	len;		/* of private data */	Isofile*	ptr;};enum{	Asis,	Clean,	Clunk};enum{	Oread = 1,	Owrite = 2,	Orclose = 4,	Omodes = 3,};extern char	Enonexist[];	/* file does not exist */extern char	Eperm[];	/* permission denied */extern char	Enofile[];	/* no file system specified */extern char	Eauth[];	/* authentication failed */extern char	*srvname;extern char	*deffile;extern int	chatty;extern jmp_buf	err_lab[];extern int	nerr_lab;extern char	err_msg[];extern int nojoliet;extern int noplan9;extern int norock;

⌨️ 快捷键说明

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