Esempio n. 1
0
File: mbr.c Progetto: agoryu/systeme
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, &secteur, &cylindre);

  write_sector_n(cylindre, secteur, buffer, nb_bloc);
}
Esempio n. 2
0
void write_sector(unsigned int cylinder, unsigned int sector,
		unsigned char* buffer) {
	write_sector_n(cylinder, sector, HDA_SECTORSIZE, buffer);
}
Esempio n. 3
0
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);
}
Esempio n. 4
0
void write_sector(const unsigned int cylinder, 
		  const unsigned int sector, 
		  const unsigned char* buffer){
  write_sector_n(cylinder, sector, buffer, HDA_SECTORSIZE);
}
Esempio n. 5
0
File: mbr.c Progetto: agoryu/systeme
int save_mbr() {
  write_sector_n(0, 0, (unsigned char*)&mbr, sizeof(struct mbr_s));
  return 1;
}