Changeset View
Changeset View
Standalone View
Standalone View
stand/uboot/uboot_disk.c
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
static int stor_info_no = 0; | static int stor_info_no = 0; | ||||
static int stor_opendev(struct disk_devdesc *); | static int stor_opendev(struct disk_devdesc *); | ||||
static int stor_readdev(struct disk_devdesc *, daddr_t, size_t, char *); | static int stor_readdev(struct disk_devdesc *, daddr_t, size_t, char *); | ||||
/* devsw I/F */ | /* devsw I/F */ | ||||
static int stor_init(void); | static int stor_init(void); | ||||
static int stor_strategy(void *, int, daddr_t, size_t, char *, size_t *); | static int stor_strategy(void *, int, daddr_t, size_t, char *, size_t *); | ||||
static int stor_open(struct open_file *, ...); | static int stor_open(struct open_file *, struct devdesc *); | ||||
static int stor_close(struct open_file *); | static int stor_close(struct open_file *); | ||||
static int stor_ioctl(struct open_file *f, u_long cmd, void *data); | static int stor_ioctl(struct open_file *f, u_long cmd, void *data); | ||||
static int stor_print(int); | static int stor_print(int); | ||||
static void stor_cleanup(void); | static void stor_cleanup(void); | ||||
struct devsw uboot_storage = { | struct devsw uboot_storage = { | ||||
"disk", | "disk", | ||||
DEVT_DISK, | DEVT_DISK, | ||||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | stor_strategy(void *devdata, int rw, daddr_t blk, size_t size, | ||||
err = stor_readdev(dev, blk + dev->d_offset, bcount, buf); | err = stor_readdev(dev, blk + dev->d_offset, bcount, buf); | ||||
if (!err && rsize) | if (!err && rsize) | ||||
*rsize = size; | *rsize = size; | ||||
return (err); | return (err); | ||||
} | } | ||||
static int | static int | ||||
stor_open(struct open_file *f, ...) | stor_open(struct open_file *f, struct devdesc *dev) | ||||
tsoome: f is now __unused ?:) | |||||
{ | { | ||||
va_list ap; | |||||
struct disk_devdesc *dev; | |||||
va_start(ap, f); | return (stor_opendev((struct disk_devdesc *)dev)); | ||||
dev = va_arg(ap, struct disk_devdesc *); | |||||
va_end(ap); | |||||
return (stor_opendev(dev)); | |||||
} | } | ||||
static int | static int | ||||
stor_opendev(struct disk_devdesc *dev) | stor_opendev(struct disk_devdesc *dev) | ||||
{ | { | ||||
int err; | int err; | ||||
if (dev->dd.d_unit < 0 || dev->dd.d_unit >= stor_info_no) | if (dev->dd.d_unit < 0 || dev->dd.d_unit >= stor_info_no) | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |
f is now __unused ?:)