Lines Matching refs:sector
157 rawread(int drive, unsigned int sector, int byte_offset, int byte_len,
197 /* Get the first sector of track. */
198 soff = sector % sectors_per_vtrack;
199 track = sector - soff;
216 read_start = sector;
233 * required sector(s) rather than failing completely.
237 sector, slen, BUFFERSEG))
246 if ((buf_track == 0 || sector == 0)
252 /* This is a EZD disk map sector 0 to sector 1 */
255 /* We already read the sector 1, copy it to sector 0 */
277 unsigned int sector_num = sector;
298 sector += num_sect;
307 devread(unsigned int sector, int byte_offset, int byte_len, char *buf)
312 if ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS))
322 sector += byte_offset >> SECTOR_BITS;
327 printf ("<%u, %d, %d>", sector, byte_offset, byte_len);
334 * -- It requires that "sector" is relative to the beginning
337 * sector.
339 return rawread (current_drive, part_start + sector, byte_offset,
345 rawwrite(int drive, unsigned int sector, char *buf)
347 if (sector == 0)
359 sector = 1;
364 sector, 1, SCRATCHSEG))
370 if (sector - sector % buf_geom.sectors == buf_track)
378 devwrite(unsigned int sector, int sector_count, char *buf)
389 sector, sector_count, buf);
398 if (! rawwrite (current_drive, part_start + sector + i,
580 start sector in *START, the length in *LEN, the offset of the
583 BUF is used to store a MBR, the boot sector of a partition, or
584 a BSD label sector, and it must be at least 512 bytes length.
721 /* Read the MBR or the boot sector of the extended partition. */