void write_bloc_n(const unsigned int vol, const unsigned int nbloc, unsigned char* buffer, const unsigned int nb_bloc) { unsigned int secteur, cylindre; calc_secteur_cylindre(vol, nbloc, §eur, &cylindre); write_sector_n(cylindre, secteur, buffer, nb_bloc); }
void write_sector(unsigned int cylinder, unsigned int sector, unsigned char* buffer) { write_sector_n(cylinder, sector, HDA_SECTORSIZE, buffer); }
void write_bloc_n(uint vol, uint nbloc, uchar *buffer, uint size) { uint cylinder = cylinder_of_bloc(vol, nbloc); uint sector = sector_of_bloc(vol, nbloc); write_sector_n(cylinder, sector, buffer, size); }
void write_sector(const unsigned int cylinder, const unsigned int sector, const unsigned char* buffer){ write_sector_n(cylinder, sector, buffer, HDA_SECTORSIZE); }
int save_mbr() { write_sector_n(0, 0, (unsigned char*)&mbr, sizeof(struct mbr_s)); return 1; }