File: bootfs.h

package info (click to toggle)
aboot 0.9b-3%2Betchnhalf.1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 980 kB
  • ctags: 1,656
  • sloc: ansic: 8,975; perl: 738; makefile: 382; asm: 309; sh: 3
file content (25 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef boot_fs_h
#define boot_fs_h

#include <linux/types.h>
#include <asm/stat.h>

struct bootfs {
	int	fs_type;
	int	blocksize;
	
	int	(*mount)(long dev, long partition_start, long quiet);

	int	(*open)(const char *filename);
	int	(*bread)(int fd, long blkno, long nblks, char *buf);
	void	(*close)(int fd);

	/* You'll probably want to use this like:
		while ((ent = fs->readdir(fd, !rewind++)));
	   so that it rewinds only on the first access.  Also don't
	   mix it with other I/O or you will die horribly */
	const char *	(*readdir)(int fd, int rewind);
	int	(*fstat)(int fd, struct stat* buf);
} ext2fs;

#endif /* boot_fs_h */