Two fixes
[tfsprogs.git] / file.h
blobbf7ad35f0d694d5772de14211a59139639e31feb
1 #ifndef FILE_H
2 #define FILE_H
4 #include "tfs.h"
6 #define SEEK_SET 0
7 #define SEEK_CUR 1
8 #define SEEK_END 2
10 struct file {
11 struct tfs_sb_info *sbi; /* which fs we belong to */
12 struct inode *inode; /* the file-specific information */
13 uint32_t offset; /* for next read */
16 struct file *tfs_open(struct tfs_sb_info *, const char *, uint32_t);
17 int tfs_read(struct file *, void *, uint32_t);
18 int tfs_write(struct file *, void *, uint32_t);
19 int tfs_lseek(struct file *, int, int);
20 void tfs_close(struct file *);
22 #endif /* file.h */