File: file.h

package info (click to toggle)
silo 1.4.14%2Bgit20120819-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,644 kB
  • sloc: ansic: 13,383; asm: 3,004; makefile: 351; sh: 102; perl: 85
file content (50 lines) | stat: -rw-r--r-- 1,681 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* Exported filesystem related stuff

   Copyright (C) 2001 Ben Collins

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   USA.  */

typedef int FILE;
#include <linux/types.h>
#include <ext2fs/ext2_fs.h>
#include <ext2fs/ext2fs.h>

extern unsigned int bs;			/* Block Size */
extern io_manager silo_io_manager;	/* The Filesystem I/O Manager */
extern void *filebuffer;
extern ext2_filsys fs;			/* Generic filesystem */
extern ino_t root, cwd;			/* root and cwd for current fs */
extern int solaris;

extern int dump_block (blk_t *, int);
extern int dump_finish (void);
extern void register_silo_inode (unsigned int, unsigned int,
				 unsigned int, unsigned int,
				 unsigned int, const char *,
				 const char *);

/* Filesystem operations provided by each module */
struct fs_ops {
    char *name;
    int (*open)		(char *);
    int (*ls)		(void);
    int (*dump)		(void);
    int (*ino_size)	(void);
    int (*namei_follow)	(const char *);
    void (*print_error)	(int);
    void (*close)	(void);
    int have_inode;
};