Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/i386/libi386/bioscd.c
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | #ifdef BD_SUPPORT_FRAGS | ||||
size_t fragsize; | size_t fragsize; | ||||
fragsize = size % BIOSCD_SECSIZE; | fragsize = size % BIOSCD_SECSIZE; | ||||
#else | #else | ||||
if (size % BIOSCD_SECSIZE) | if (size % BIOSCD_SECSIZE) | ||||
return (EINVAL); | return (EINVAL); | ||||
#endif | #endif | ||||
if (rw != F_READ) | if ((rw & F_MASK) != F_READ) | ||||
return(EROFS); | return(EROFS); | ||||
dev = (struct i386_devdesc *)devdata; | dev = (struct i386_devdesc *)devdata; | ||||
unit = dev->d_unit; | unit = dev->d_unit; | ||||
blks = size / BIOSCD_SECSIZE; | blks = size / BIOSCD_SECSIZE; | ||||
if (dblk % (BIOSCD_SECSIZE / DEV_BSIZE) != 0) | if (dblk % (BIOSCD_SECSIZE / DEV_BSIZE) != 0) | ||||
return (EINVAL); | return (EINVAL); | ||||
dblk /= (BIOSCD_SECSIZE / DEV_BSIZE); | dblk /= (BIOSCD_SECSIZE / DEV_BSIZE); | ||||
DEBUG("read %d from %lld to %p", blks, dblk, buf); | DEBUG("read %d from %lld to %p", blks, dblk, buf); | ||||
▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines |