#ifndef __VOLUME_VOLUMES_H #define __VOLUME_VOLUMES_H #include #define MAX_VOLUMES 8 #define VOLUME_NAME_LENGTH 12 /* * Detrompeur */ #define VOLUME_MAGIC 0xdead /* * Types des volumes */ enum vol_type_t { VOLT_BASE, VOLT_ANNEX, VOLT_OTHER }; /* * Description d'un volume */ struct vol_desc_t { uint16_t magic_key; uint16_t num_cyl; uint16_t num_sec; uint16_t size; enum vol_type_t vol_type; }; void format_volume(unsigned int partition); void dump_volume(struct vol_desc_t *vol); uint16_t cylinder_of_block(unsigned int vol, uint32_t bloc); uint16_t sector_of_block(unsigned int vol, uint32_t bloc); #endif /* __VOLUME_VOLUMES_H */