Releasing debian version 4.06+dfsg-2.
[syslinux-debian/hramrach.git] / core / include / disk.h
blobac23e9216826cb04bb12fe6481f091f572028efa
1 #ifndef DISK_H
2 #define DISK_H
4 #include <stddef.h>
5 #include <stdint.h>
6 #include <stdbool.h>
8 typedef uint64_t sector_t;
9 typedef uint64_t block_t;
12 * struct disk: contains the information about a specific disk and also
13 * contains the I/O function.
15 struct disk {
16 unsigned int disk_number; /* in BIOS style */
17 unsigned int sector_size; /* gener512B or 2048B */
18 unsigned int sector_shift;
19 unsigned int maxtransfer; /* Max sectors per transfer */
21 unsigned int h, s; /* CHS geometry */
22 unsigned int secpercyl; /* h*s */
23 unsigned int _pad;
25 sector_t part_start; /* the start address of this partition(in sectors) */
27 int (*rdwr_sectors)(struct disk *, void *, sector_t, size_t, bool);
30 extern void read_sectors(char *, sector_t, int);
31 extern void getoneblk(struct disk *, char *, block_t, int);
33 /* diskio.c */
34 struct disk *disk_init(uint8_t, bool, sector_t, uint16_t, uint16_t, uint32_t);
35 struct device *device_init(uint8_t, bool, sector_t, uint16_t, uint16_t, uint32_t);
37 #endif /* DISK_H */