2009-10-01 16:00:27 +02:00
|
|
|
/* Function prototypes for iso9660 file system. */
|
|
|
|
|
|
|
|
struct dir_record;
|
2014-08-03 19:24:51 +02:00
|
|
|
struct dir_extent;
|
|
|
|
struct rrii_dir_record;
|
|
|
|
struct iso9660_dir_record;
|
|
|
|
struct iso9660_vol_pri_desc;
|
|
|
|
struct inode;
|
2015-09-16 14:36:11 +02:00
|
|
|
struct inode_dir_entry;
|
2009-10-01 16:00:27 +02:00
|
|
|
|
|
|
|
/* inode.c */
|
2014-08-24 12:37:12 +02:00
|
|
|
int fs_putnode(ino_t ino_nr, unsigned int count);
|
2014-08-03 19:24:51 +02:00
|
|
|
|
2015-09-16 14:36:11 +02:00
|
|
|
struct inode* get_inode(ino_t ino_nr);
|
|
|
|
struct inode* open_inode(ino_t ino_nr);
|
2014-08-03 19:24:51 +02:00
|
|
|
void put_inode(struct inode *i);
|
|
|
|
void dup_inode(struct inode *i_node);
|
|
|
|
|
2015-09-16 14:36:11 +02:00
|
|
|
int read_directory(struct inode *dir);
|
2014-08-03 19:24:51 +02:00
|
|
|
|
2015-09-16 14:36:11 +02:00
|
|
|
int read_inode(struct inode_dir_entry *dir_entry, struct dir_extent *extent,
|
|
|
|
size_t *offset);
|
|
|
|
|
|
|
|
struct inode* inode_cache_get(ino_t ino_nr);
|
|
|
|
void inode_cache_add(ino_t ino_nr, struct inode *i_node);
|
2014-08-03 19:24:51 +02:00
|
|
|
|
2014-08-24 13:50:23 +02:00
|
|
|
int check_inodes(void);
|
|
|
|
|
2014-08-03 19:24:51 +02:00
|
|
|
/* link.c */
|
2014-08-24 12:37:12 +02:00
|
|
|
ssize_t fs_rdlink(ino_t ino_nr, struct fsdriver_data *data, size_t bytes);
|
- Introduce support for sticky bit.
- Revise VFS-FS protocol and update VFS/MFS/ISOFS accordingly.
- Clean up MFS by removing old, dead code (backwards compatibility is broken by
the new VFS-FS protocol, anyway) and rewrite other parts. Also, make sure all
functions have proper banners and prototypes.
- VFS should always provide a (syntactically) valid path to the FS; no need for
the FS to do sanity checks when leaving/entering mount points.
- Fix several bugs in MFS:
- Several path lookup bugs in MFS.
- A link can be too big for the path buffer.
- A mountpoint can become inaccessible when the creation of a new inode
fails, because the inode already exists and is a mountpoint.
- Introduce support for supplemental groups.
- Add test 46 to test supplemental group functionality (and removed obsolete
suppl. tests from test 2).
- Clean up VFS (not everything is done yet).
- ISOFS now opens device read-only. This makes the -r flag in the mount command
unnecessary (but will still report to be mounted read-write).
- Introduce PipeFS. PipeFS is a new FS that handles all anonymous and
named pipes. However, named pipes still reside on the (M)FS, as they are part
of the file system on disk. To make this work VFS now has a concept of
'mapped' inodes, which causes read, write, truncate and stat requests to be
redirected to the mapped FS, and all other requests to the original FS.
2009-12-20 21:27:14 +01:00
|
|
|
|
|
|
|
/* mount.c */
|
2014-08-24 12:37:12 +02:00
|
|
|
int fs_mount(dev_t dev, unsigned int flags, struct fsdriver_node *root_node,
|
|
|
|
unsigned int *res_flags);
|
|
|
|
int fs_mountpt(ino_t ino_nr);
|
|
|
|
void fs_unmount(void);
|
2009-10-01 16:00:27 +02:00
|
|
|
|
|
|
|
/* path.c */
|
2014-08-24 12:37:12 +02:00
|
|
|
int fs_lookup(ino_t ino_nr, char *name, struct fsdriver_node *node,
|
|
|
|
int *is_mountpt);
|
- Introduce support for sticky bit.
- Revise VFS-FS protocol and update VFS/MFS/ISOFS accordingly.
- Clean up MFS by removing old, dead code (backwards compatibility is broken by
the new VFS-FS protocol, anyway) and rewrite other parts. Also, make sure all
functions have proper banners and prototypes.
- VFS should always provide a (syntactically) valid path to the FS; no need for
the FS to do sanity checks when leaving/entering mount points.
- Fix several bugs in MFS:
- Several path lookup bugs in MFS.
- A link can be too big for the path buffer.
- A mountpoint can become inaccessible when the creation of a new inode
fails, because the inode already exists and is a mountpoint.
- Introduce support for supplemental groups.
- Add test 46 to test supplemental group functionality (and removed obsolete
suppl. tests from test 2).
- Clean up VFS (not everything is done yet).
- ISOFS now opens device read-only. This makes the -r flag in the mount command
unnecessary (but will still report to be mounted read-write).
- Introduce PipeFS. PipeFS is a new FS that handles all anonymous and
named pipes. However, named pipes still reside on the (M)FS, as they are part
of the file system on disk. To make this work VFS now has a concept of
'mapped' inodes, which causes read, write, truncate and stat requests to be
redirected to the mapped FS, and all other requests to the original FS.
2009-12-20 21:27:14 +01:00
|
|
|
|
2009-10-01 16:00:27 +02:00
|
|
|
/* read.c */
|
2014-08-24 12:37:12 +02:00
|
|
|
ssize_t fs_read(ino_t ino_nr, struct fsdriver_data *data, size_t bytes,
|
|
|
|
off_t pos, int call);
|
|
|
|
ssize_t fs_getdents(ino_t ino_nr, struct fsdriver_data *data, size_t bytes,
|
|
|
|
off_t *pos);
|
2014-08-03 19:24:51 +02:00
|
|
|
|
- Introduce support for sticky bit.
- Revise VFS-FS protocol and update VFS/MFS/ISOFS accordingly.
- Clean up MFS by removing old, dead code (backwards compatibility is broken by
the new VFS-FS protocol, anyway) and rewrite other parts. Also, make sure all
functions have proper banners and prototypes.
- VFS should always provide a (syntactically) valid path to the FS; no need for
the FS to do sanity checks when leaving/entering mount points.
- Fix several bugs in MFS:
- Several path lookup bugs in MFS.
- A link can be too big for the path buffer.
- A mountpoint can become inaccessible when the creation of a new inode
fails, because the inode already exists and is a mountpoint.
- Introduce support for supplemental groups.
- Add test 46 to test supplemental group functionality (and removed obsolete
suppl. tests from test 2).
- Clean up VFS (not everything is done yet).
- ISOFS now opens device read-only. This makes the -r flag in the mount command
unnecessary (but will still report to be mounted read-write).
- Introduce PipeFS. PipeFS is a new FS that handles all anonymous and
named pipes. However, named pipes still reside on the (M)FS, as they are part
of the file system on disk. To make this work VFS now has a concept of
'mapped' inodes, which causes read, write, truncate and stat requests to be
redirected to the mapped FS, and all other requests to the original FS.
2009-12-20 21:27:14 +01:00
|
|
|
/* stadir.c */
|
2014-08-24 12:37:12 +02:00
|
|
|
int fs_stat(ino_t ino_nr, struct stat *statbuf);
|
|
|
|
int fs_statvfs(struct statvfs *st);
|
- Introduce support for sticky bit.
- Revise VFS-FS protocol and update VFS/MFS/ISOFS accordingly.
- Clean up MFS by removing old, dead code (backwards compatibility is broken by
the new VFS-FS protocol, anyway) and rewrite other parts. Also, make sure all
functions have proper banners and prototypes.
- VFS should always provide a (syntactically) valid path to the FS; no need for
the FS to do sanity checks when leaving/entering mount points.
- Fix several bugs in MFS:
- Several path lookup bugs in MFS.
- A link can be too big for the path buffer.
- A mountpoint can become inaccessible when the creation of a new inode
fails, because the inode already exists and is a mountpoint.
- Introduce support for supplemental groups.
- Add test 46 to test supplemental group functionality (and removed obsolete
suppl. tests from test 2).
- Clean up VFS (not everything is done yet).
- ISOFS now opens device read-only. This makes the -r flag in the mount command
unnecessary (but will still report to be mounted read-write).
- Introduce PipeFS. PipeFS is a new FS that handles all anonymous and
named pipes. However, named pipes still reside on the (M)FS, as they are part
of the file system on disk. To make this work VFS now has a concept of
'mapped' inodes, which causes read, write, truncate and stat requests to be
redirected to the mapped FS, and all other requests to the original FS.
2009-12-20 21:27:14 +01:00
|
|
|
|
|
|
|
/* super.c */
|
2015-09-16 14:36:11 +02:00
|
|
|
int release_vol_pri_desc(struct iso9660_vol_pri_desc *vol_pri);
|
2014-08-03 19:24:51 +02:00
|
|
|
int read_vds(struct iso9660_vol_pri_desc *v_pri, dev_t dev);
|
|
|
|
|
|
|
|
/* susp.c */
|
|
|
|
int parse_susp(struct rrii_dir_record *dir, char *buffer);
|
|
|
|
void parse_susp_buffer(struct rrii_dir_record *dir, char *buffer, u32_t size);
|
|
|
|
|
|
|
|
/* susp_rock_ridge.c */
|
2014-08-24 12:37:12 +02:00
|
|
|
void parse_susp_rock_ridge_sl(struct rrii_dir_record *dir, char *buffer,
|
|
|
|
int length);
|
2014-08-03 19:24:51 +02:00
|
|
|
int parse_susp_rock_ridge(struct rrii_dir_record *dir, char *buffer);
|
2009-10-01 16:00:27 +02:00
|
|
|
|
|
|
|
/* utility.c */
|
2015-09-16 14:36:11 +02:00
|
|
|
void free_inode_dir_entry(struct inode_dir_entry *e);
|
2014-08-03 19:24:51 +02:00
|
|
|
void free_extent(struct dir_extent *extent);
|
|
|
|
struct buf* read_extent_block(struct dir_extent *e, size_t block);
|
|
|
|
size_t get_extent_absolute_block_id(struct dir_extent *e, size_t block);
|
|
|
|
|
|
|
|
time_t date7_to_time_t(const u8_t *date);
|
2015-09-16 14:36:11 +02:00
|
|
|
void* alloc_mem(size_t s);
|