Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/ofw/libofw/ofw_disk.c
Show All 37 Lines | |||||
#include <stand.h> | #include <stand.h> | ||||
#include "bootstrap.h" | #include "bootstrap.h" | ||||
#include "libofw.h" | #include "libofw.h" | ||||
static int ofwd_init(void); | static int ofwd_init(void); | ||||
static int ofwd_strategy(void *devdata, int flag, daddr_t dblk, | static int ofwd_strategy(void *devdata, int flag, daddr_t dblk, | ||||
size_t size, char *buf, size_t *rsize); | size_t offset, size_t size, char *buf, size_t *rsize); | ||||
static int ofwd_open(struct open_file *f, ...); | static int ofwd_open(struct open_file *f, ...); | ||||
static int ofwd_close(struct open_file *f); | static int ofwd_close(struct open_file *f); | ||||
static int ofwd_ioctl(struct open_file *f, u_long cmd, void *data); | static int ofwd_ioctl(struct open_file *f, u_long cmd, void *data); | ||||
static void ofwd_print(int verbose); | static void ofwd_print(int verbose); | ||||
struct devsw ofwdisk = { | struct devsw ofwdisk = { | ||||
"block", | "block", | ||||
DEVT_DISK, | DEVT_DISK, | ||||
Show All 23 Lines | |||||
static int | static int | ||||
ofwd_init(void) | ofwd_init(void) | ||||
{ | { | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
ofwd_strategy(void *devdata, int flag __unused, daddr_t dblk, size_t size, | ofwd_strategy(void *devdata, int flag __unused, daddr_t dblk, size_t offset, | ||||
char *buf, size_t *rsize) | size_t size, char *buf, size_t *rsize) | ||||
{ | { | ||||
struct ofw_devdesc *dp = (struct ofw_devdesc *)devdata; | struct ofw_devdesc *dp = (struct ofw_devdesc *)devdata; | ||||
daddr_t pos; | daddr_t pos; | ||||
int n; | int n; | ||||
if (dp != kdp) { | if (dp != kdp) { | ||||
if (kdp != NULL) { | if (kdp != NULL) { | ||||
#if !defined(__powerpc__) | #if !defined(__powerpc__) | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |