File: romfs.h

package info (click to toggle)
silo 0.9.8-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 988 kB
  • ctags: 2,245
  • sloc: ansic: 10,619; asm: 2,783; makefile: 405; perl: 77; sh: 3
file content (32 lines) | stat: -rw-r--r-- 810 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
#include <ext2fs/ext2fs.h>

#ifdef __linux__

#include <features.h>
#ifdef __GLIBC__
#  define _LINUX_TIME_H
#endif
#include <linux/version.h>
#ifndef KERNEL_VERSION
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,47)
#include <linux/romfs_fs.h>
#else
#include <non-linux/romfs_fs.h>
#endif

#else

#include <non-linux/romfs_fs.h>

#endif

typedef ext2_filsys romfs_filsys;

int romfs_open(char *device, io_manager io, romfs_filsys *fs);
int romfs_namei(romfs_filsys fs, ino_t root, ino_t cwd, char *filename, ino_t *inode);
void romfs_close(romfs_filsys fs);
int romfs_read_inode(romfs_filsys fs, ino_t inode, struct romfs_inode *ui);
int romfs_block_iterate(romfs_filsys, ino_t,
		      int (*)(romfs_filsys, blk_t *, int, void *), void *);