Home
last modified time | relevance | path

Searched refs:disk_blocks (Results 1 – 2 of 2) sorted by relevance

/freebsd-12.1/stand/i386/libi386/
H A Dbiosdisk.c901 uint64_t disk_blocks, offset, d_offset; in bd_realstrategy() local
954 disk_blocks = 0; in bd_realstrategy()
956 if (disk_ioctl(dev, DIOCGMEDIASIZE, &disk_blocks) == 0) { in bd_realstrategy()
958 disk_blocks /= bd->bd_sectorsize; in bd_realstrategy()
962 if (disk_blocks == 0) in bd_realstrategy()
963 disk_blocks = bd->bd_sectors - d_offset; in bd_realstrategy()
966 if (dblk < d_offset || dblk >= d_offset + disk_blocks) in bd_realstrategy()
972 if (dblk + blks >= d_offset + disk_blocks) { in bd_realstrategy()
973 blks = d_offset + disk_blocks - dblk; in bd_realstrategy()
/freebsd-12.1/stand/efi/libefi/
H A Defipart.c989 uint64_t off, disk_blocks, d_offset = 0; in efipart_realstrategy() local
1016 disk_blocks = 0; in efipart_realstrategy()
1018 if (disk_ioctl(dev, DIOCGMEDIASIZE, &disk_blocks) == 0) { in efipart_realstrategy()
1020 disk_blocks /= blkio->Media->BlockSize; in efipart_realstrategy()
1024 if (disk_blocks == 0) in efipart_realstrategy()
1025 disk_blocks = blkio->Media->LastBlock + 1 - d_offset; in efipart_realstrategy()
1028 if ((off + size) / blkio->Media->BlockSize > d_offset + disk_blocks) { in efipart_realstrategy()
1029 diskend = d_offset + disk_blocks; in efipart_realstrategy()