10 /* I don't know it's right or not */
11 #define USE_CACHE(device_num) (device_num >= 0x00 && device_num < 0xfe)
16 struct fs_ops *fs_ops;
17 struct device *fs_dev;
21 void* open_file; /* points to the fs-specific open_file_t */
28 /* in fact, we use fs_ops structure to find the right fs */
32 void (*searchdir)(char *, struct file *);
33 uint32_t (*getfssec)(struct fs_info *, char *, void * , int, int *);
34 void (*mangle_name)(char *, char *);
35 void (*unmangle_name)(void);
36 void (*load_config)(com32sys_t *);
39 enum dev_type {CHS, EDD};
42 * Struct device should have all the information about a specific disk
43 * structure, and contain either a pointer to the metadata cache or
44 * actually contain the cache itself.
46 * All the information in this case is stuff like BIOS device number,
47 * type of access (CHS, EDD, ...), geometry, partition offset, and
50 * It would be usefull and much easier to implement the C version getlinsec
51 * later(I have not much time to implement it now, so I will leave it for
52 * a while, maybe a long while).
55 /* the device numger (in BIOS style ) */
56 uint8_t device_number;
58 /* type of access (CHS or EDD ) */
61 /* the sector size, 512B for disk and floppy, 2048B for CD */
69 /* the start address of this partition(in sectors) */
72 int (*rdwr_sectors)(struct device *, void *, sector_t, size_t, bool);
75 * I think we still need the cache_data filed here, 'cause hpa said
76 * different device has diffrent cache buffer, and the following filed
77 * are quite for cache parts.
80 struct cache_struct *cache_head;
81 uint16_t cache_block_size;
82 uint16_t cache_entries;