diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2012-01-17 15:15:58 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2012-01-17 15:15:58 +0000 |
commit | 006b02f3c3c63e415acb9ad10ca4267c7b6d4423 (patch) | |
tree | a28501bb7c87986bb565dec8d61dd8488b725a6e /sys/dev/biovar.h | |
parent | 2ee577b426ec5c04f61fcf5c2340358657f420c9 (diff) |
Move the bio(4) cookie into a separate struct and make this struct the
first member of each ioctl data structure. This will allow for future
changes to bio(4) status handling.
Diffstat (limited to 'sys/dev/biovar.h')
-rw-r--r-- | sys/dev/biovar.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/sys/dev/biovar.h b/sys/dev/biovar.h index 62f52a23650..5d2b2c4c81e 100644 --- a/sys/dev/biovar.h +++ b/sys/dev/biovar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: biovar.h,v 1.40 2011/05/20 14:46:44 marco Exp $ */ +/* $OpenBSD: biovar.h,v 1.41 2012/01/17 15:15:57 jsing Exp $ */ /* * Copyright (c) 2002 Niklas Hallqvist. All rights reserved. @@ -28,20 +28,19 @@ /* * Devices getting ioctls through this interface should use ioctl class 'B' * and command numbers starting from 32, lower ones are reserved for generic - * ioctls. All ioctl data must be structures which start with a void * - * cookie. + * ioctls. All ioctl data must be structures which start with a struct bio. */ #include <sys/types.h> -struct bio_common { - void *bc_cookie; +struct bio { + void *bio_cookie; }; /* convert name to a cookie */ #define BIOCLOCATE _IOWR('B', 0, struct bio_locate) struct bio_locate { - void *bl_cookie; + struct bio bl_bio; char *bl_name; }; @@ -53,7 +52,7 @@ void bio_unregister(struct device *); #define BIOCINQ _IOWR('B', 32, struct bioc_inq) struct bioc_inq { - void *bi_cookie; + struct bio bi_bio; char bi_dev[16]; /* controller device */ int bi_novol; /* nr of volumes */ @@ -63,7 +62,7 @@ struct bioc_inq { #define BIOCDISK _IOWR('B', 33, struct bioc_disk) /* structure that represents a disk in a RAID volume */ struct bioc_disk { - void *bd_cookie; + struct bio bd_bio; u_int16_t bd_channel; u_int16_t bd_target; @@ -99,7 +98,7 @@ struct bioc_disk { #define BIOCVOL _IOWR('B', 34, struct bioc_vol) /* structure that represents a RAID volume */ struct bioc_vol { - void *bv_cookie; + struct bio bv_bio; int bv_volid; /* volume id */ int16_t bv_percent; /* percent done operation */ @@ -130,7 +129,7 @@ struct bioc_vol { #define BIOCALARM _IOWR('B', 35, struct bioc_alarm) struct bioc_alarm { - void *ba_cookie; + struct bio ba_bio; int ba_opcode; int ba_status; /* only used with get state */ @@ -143,7 +142,7 @@ struct bioc_alarm { #define BIOCBLINK _IOWR('B', 36, struct bioc_blink) struct bioc_blink { - void *bb_cookie; + struct bio bb_bio; u_int16_t bb_channel; u_int16_t bb_target; @@ -155,7 +154,7 @@ struct bioc_blink { #define BIOCSETSTATE _IOWR('B', 37, struct bioc_setstate) struct bioc_setstate { - void *bs_cookie; + struct bio bs_bio; u_int16_t bs_channel; u_int16_t bs_target; u_int16_t bs_lun; @@ -174,7 +173,7 @@ struct bioc_setstate { #define BIOCCREATERAID _IOWR('B', 38, struct bioc_createraid) struct bioc_createraid { - void *bc_cookie; + struct bio bc_bio; void *bc_dev_list; u_int16_t bc_dev_list_len; int32_t bc_key_disk; @@ -198,7 +197,7 @@ struct bioc_createraid { #define BIOCDELETERAID _IOWR('B', 39, struct bioc_deleteraid) struct bioc_deleteraid { - void *bd_cookie; + struct bio bd_bio; u_int32_t bd_flags; #define BIOC_SDCLEARMETA 0x01 /* clear metadata region */ char bd_dev[16]; /* device */ @@ -206,7 +205,7 @@ struct bioc_deleteraid { #define BIOCDISCIPLINE _IOWR('B', 40, struct bioc_discipline) struct bioc_discipline { - void *bd_cookie; + struct bio bd_bio; char bd_dev[16]; u_int32_t bd_cmd; u_int32_t bd_size; @@ -215,7 +214,7 @@ struct bioc_discipline { #define BIOCINSTALLBOOT _IOWR('B', 41, struct bioc_installboot) struct bioc_installboot { - void *bb_cookie; + struct bio bb_bio; char bb_dev[16]; void *bb_bootblk; void *bb_bootldr; |