Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/block_if.h
Show All 38 Lines | |||||
#define _BLOCK_IF_H_ | #define _BLOCK_IF_H_ | ||||
#include <sys/uio.h> | #include <sys/uio.h> | ||||
#include <sys/unistd.h> | #include <sys/unistd.h> | ||||
#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ | #define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ | ||||
struct blockif_req { | struct blockif_req { | ||||
struct iovec br_iov[BLOCKIF_IOV_MAX]; | |||||
int br_iovcnt; | int br_iovcnt; | ||||
off_t br_offset; | off_t br_offset; | ||||
ssize_t br_resid; | ssize_t br_resid; | ||||
void (*br_callback)(struct blockif_req *req, int err); | void (*br_callback)(struct blockif_req *req, int err); | ||||
void *br_param; | void *br_param; | ||||
struct iovec br_iov[BLOCKIF_IOV_MAX]; | |||||
}; | }; | ||||
struct blockif_ctxt; | struct blockif_ctxt; | ||||
struct blockif_ctxt *blockif_open(const char *optstr, const char *ident); | struct blockif_ctxt *blockif_open(const char *optstr, const char *ident); | ||||
off_t blockif_size(struct blockif_ctxt *bc); | off_t blockif_size(struct blockif_ctxt *bc); | ||||
void blockif_chs(struct blockif_ctxt *bc, uint16_t *c, uint8_t *h, | void blockif_chs(struct blockif_ctxt *bc, uint16_t *c, uint8_t *h, | ||||
uint8_t *s); | uint8_t *s); | ||||
int blockif_sectsz(struct blockif_ctxt *bc); | int blockif_sectsz(struct blockif_ctxt *bc); | ||||
Show All 12 Lines |