Home | History | Annotate | Download | only in stage2

Lines Matching refs:sector

140 rawread (int drive, int sector, int byte_offset, int byte_len, char *buf)
169 /* Make sure that SECTOR is valid. */
170 if (sector < 0 || sector >= buf_geom.total_sectors)
185 /* Get the first sector of track. */
186 soff = sector % sectors_per_vtrack;
187 track = sector - soff;
203 read_start = sector;
220 * required sector(s) rather than failing completely.
224 sector, slen, BUFFERSEG))
233 if ((buf_track == 0 || sector == 0)
239 /* This is a EZD disk map sector 0 to sector 1 */
242 /* We already read the sector 1, copy it to sector 0 */
264 int sector_num = sector;
285 sector += num_sect;
294 devread (int sector, int byte_offset, int byte_len, char *buf)
299 if (sector < 0
300 || ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS))
310 sector += byte_offset >> SECTOR_BITS;
315 printf ("<%d, %d, %d>", sector, byte_offset, byte_len);
322 * -- It requires that "sector" is relative to the beginning
325 * sector.
327 return rawread (current_drive, part_start + sector, byte_offset,
333 rawwrite (int drive, int sector, char *buf)
335 if (sector == 0)
347 sector = 1;
352 sector, 1, SCRATCHSEG))
358 if (sector - sector % buf_geom.sectors == buf_track)
366 devwrite (int sector, int sector_count, char *buf)
377 sector, sector_count, buf);
386 if (! rawwrite (current_drive, part_start + sector + i,
568 start sector in *START, the length in *LEN, the offset of the
571 BUF is used to store a MBR, the boot sector of a partition, or
572 a BSD label sector, and it must be at least 512 bytes length.
658 /* Read the MBR or the boot sector of the extended partition. */