Core: unmangle_name converted
[profile/ivi/syslinux.git] / core / include / fs.h
1 #ifndef FS_H
2 #define FS_H
3
4 #include <stddef.h>
5 #include <stdbool.h>
6 #include <com32.h>
7 #include "core.h"
8 #include "disk.h"
9
10 struct fs_info {
11     char *fs_name;
12     struct fs_ops *fs_ops;
13     struct device *fs_dev;
14 };
15
16 struct file {
17     void*    open_file; /* points to the fs-specific open_file_t */
18     struct   fs_info *fs;
19     uint32_t file_len;
20 };
21
22
23 struct fs_ops {
24     /* in fact, we use fs_ops structure to find the right fs */
25     char *fs_name;
26     
27     int      (*fs_init)(struct fs_info *);
28     void     (*searchdir)(char *, struct file *);
29     uint32_t (*getfssec)(struct fs_info *, char *, void * , int, int *);
30     void     (*mangle_name)(char *, char *);
31     int      (*unmangle_name)(char *, char *);
32     void     (*load_config)(com32sys_t *);
33 };
34
35 enum dev_type {CHS, EDD};
36     
37 /*
38  * Struct device contains:
39  *     the pointer points to the disk structure,
40  *     the cache stuff.
41  */
42 struct device {
43     struct disk *disk;
44
45     /* the cache stuff */
46     char* cache_data;
47     void* cache_head;
48     uint16_t cache_block_size;
49     uint16_t cache_entries;
50     uint32_t cache_size;
51 };
52
53 #endif /* FS_H */