Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/uboot/lib/disk.c
Show First 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
stor_strategy(void *devdata, int rw, daddr_t blk, size_t size, | stor_strategy(void *devdata, int rw, daddr_t blk, size_t size, | ||||
char *buf, size_t *rsize) | char *buf, size_t *rsize) | ||||
{ | { | ||||
struct disk_devdesc *dev = (struct disk_devdesc *)devdata; | struct disk_devdesc *dev = (struct disk_devdesc *)devdata; | ||||
daddr_t bcount; | daddr_t bcount; | ||||
int err; | int err; | ||||
rw &= F_MASK; | |||||
if (rw != F_READ) { | if (rw != F_READ) { | ||||
stor_printf("write attempt, operation not supported!\n"); | stor_printf("write attempt, operation not supported!\n"); | ||||
return (EROFS); | return (EROFS); | ||||
} | } | ||||
if (size % SI(dev).bsize) { | if (size % SI(dev).bsize) { | ||||
stor_printf("size=%zu not multiple of device " | stor_printf("size=%zu not multiple of device " | ||||
"block size=%d\n", | "block size=%d\n", | ||||
▲ Show 20 Lines • Show All 155 Lines • Show Last 20 Lines |