source: trunk/minix/boot/rawfs.h@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.4 KB
RevLine 
[9]1/* rawfs.h - Raw Minix file system support. Author: Kees J. Bot
2 *
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.
6 *
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.
10 *
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.
15 *
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.
19 *
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.
25 *
26 * One function needs to be provided by the outside world:
27 *
28 * void readblock(off_t blockno, char *buf, int block_size);
29 * Read a block into the buffer. Outside world handles
30 * errors.
31 */
32
33#define ROOT_INO ((ino_t) 1) /* Inode nr of root dir. */
34
35off_t r_super(int *);
36void r_stat(Ino_t file, struct stat *stp);
37off_t r_vir2abs(off_t virblockno);
38ino_t r_readdir(char *name);
39ino_t r_lookup(Ino_t cwd, char *path);
40
41/*
42 * $PchId: rawfs.h,v 1.4 1996/04/19 08:16:36 philip Exp $
43 */
Note: See TracBrowser for help on using the repository browser.