Lines Matching refs:sector

158 rawread(int drive, unsigned long long sector, int byte_offset, int byte_len,
198 /* Get the first sector of track. */
199 soff = sector % sectors_per_vtrack;
200 track = sector - soff;
217 read_start = sector;
234 * required sector(s) rather than failing completely.
238 sector, slen, BUFFERSEG))
247 if ((buf_track == 0 || sector == 0)
253 /* This is a EZD disk map sector 0 to sector 1 */
256 /* We already read the sector 1, copy it to sector 0 */
278 unsigned long long sector_num = sector;
299 sector += num_sect;
308 devread(unsigned long long sector, int byte_offset, int byte_len, char *buf)
313 if ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS))
323 sector += byte_offset >> SECTOR_BITS;
328 printf ("<%llu, %d, %d>", sector, byte_offset, byte_len);
335 * -- It requires that "sector" is relative to the beginning
338 * sector.
340 return rawread (current_drive, part_start + sector, byte_offset,
346 rawwrite(int drive, unsigned long long sector, char *buf)
348 if (sector == 0)
360 sector = 1;
365 sector, 1, SCRATCHSEG))
371 if (sector - sector % buf_geom.sectors == buf_track)
379 devwrite(unsigned long long sector, int sector_count, char *buf)
390 sector, sector_count, buf);
399 if (! rawwrite (current_drive, part_start + sector + i,
588 start sector in *START, the length in *LEN, the offset of the
591 BUF is used to store a MBR, the boot sector of a partition, or
592 a BSD label sector, and it must be at least 512 bytes length.
732 /* Read the MBR or the boot sector of the extended partition. */
767 Re-read the MBR or the boot sector of the extended