Plan 9 from Bell Labs’s /usr/web/sources/extra/fs/fs/port/fs.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


typedef struct Nvfile Nvfile;
typedef struct Fs Fs;

//#include "dosfs.h"
//#include "kfs.h"

struct Nvfile{
	union{
//		Dosfile	dos;
//		Kfsfile	kfs;
		int walked;
	};
	Fs	*fs;
	char	*path;
};

struct Fs{
//	union {
//		Dos dos;
//		Kfs kfs;
//	};
	int	dev;				/* device id */
	long	(*diskread)(Fs*, void*, long);	/* disk read routine */
	Off	(*diskseek)(Fs*, Off);		/* disk seek routine */
	long	(*read)(Nvfile*, void*, long);
	int	(*walk)(Nvfile*, char*);
	Nvfile	root;
};

extern int chatty;
extern int dotini(Fs*);
extern int fswalk(Fs*, char*, Nvfile*);
extern int fsread(Nvfile*, void*, long);
extern int fsboot(Fs*, char*, void*);

#define BADPTR(x) ((ulong)x < 0x80000000)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.