code: mafs

ref: 7038b412045ad003366804789e7fecaf0552f77c
dir: /fns.h/

View raw version

u64 nlastdatablocks(u64 size);
u64 nperiblock(u16 tag);
u64	nperindunit(u16 tag);
u8	rel2tind(u64 reli);
u64	tagstartreli(u8 tag);
u64	maxreli(u8 tag);
u64	maxblocks(u8 tag);
u64	nlastdatablocks(u64 size);
u64 size2datareli(u64 size);

/* actual device i/o routines */
u64	devinit(char *devfile);
s32	devread(u64 blkno, void *b, u16 len);
u64	devsize(void);
s32	devwrite(u64 blkno, void *b, u16 len);

/* show blocks */
void	showblock(int fd, u8 *buf);
void	showdentry(int fd, u8 *buf);
void	showmagic(int fd, u8 *buf);
void	showconfig(int fd, u8 *buf);
void	showsuper(int fd, u8 *buf);
void	showdata(int fd, u8 *buf);
void	showind0(int fd, u8 *buf);
void	showind(int fd, u8 *buf);
u16		blklen(u16 tag);

void	panic(char*, ...);