}
struct filehdr *
-filehdr_read (disk_sector_no filehdr_sector)
+filehdr_read (disk_sector_t filehdr_sector)
{
struct filehdr *h = calloc (1, sizeof *h);
if (h == NULL)
}
void
-filehdr_write (const struct filehdr *h, disk_sector_no filehdr_sector)
+filehdr_write (const struct filehdr *h, disk_sector_t filehdr_sector)
{
ASSERT (h != NULL);
ASSERT (sizeof *h == DISK_SECTOR_SIZE);
free (h);
}
-disk_sector_no
+disk_sector_t
filehdr_byte_to_sector (const struct filehdr *h, off_t pos)
{
size_t idx;
ASSERT (h != NULL);
idx = pos / DISK_SECTOR_SIZE;
- return idx < h->sector_cnt ? h->sectors[idx] : (disk_sector_no) -1;
+ return idx < h->sector_cnt ? h->sectors[idx] : (disk_sector_t) -1;
}
off_t