1 /* rawfs.h - Raw Minix file system support. Author: Kees J. Bot
3 * off_t r_super(int *block_size);
4 * Initialize variables, returns the size of a valid Minix
5 * file system blocks, but zero on error.
7 * void r_stat(ino_t file, struct stat *stp);
8 * Return information about a file like stat(2) and
9 * remembers file for the next two calls.
11 * off_t r_vir2abs(off_t virblockno);
12 * Translate virtual block number in file to absolute
13 * disk block number. Returns 0 if the file contains
14 * a hole, or -1 if the block lies past the end of file.
16 * ino_t r_readdir(char *name);
17 * Return next directory entry or 0 if there are no more.
18 * Returns -1 and sets errno on error.
20 * ino_t r_lookup(ino_t cwd, char *path);
21 * A utility function that translates a pathname to an
22 * inode number. It starts from directory "cwd" unless
23 * path starts with a '/', then from ROOT_INO.
24 * Returns 0 and sets errno on error.
26 * One function needs to be provided by the outside world:
28 * void readblock(off_t blockno, char *buf, int block_size);
29 * Read a block into the buffer. Outside world handles
33 #define ROOT_INO ((ino_t) 1) /* Inode nr of root dir. */
36 void r_stat(Ino_t file
, struct stat
*stp
);
37 off_t
r_vir2abs(off_t virblockno
);
38 ino_t
r_readdir(char *name
);
39 ino_t
r_lookup(Ino_t cwd
, char *path
);
42 * $PchId: rawfs.h,v 1.4 1996/04/19 08:16:36 philip Exp $