diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2011-12-25 15:28:18 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2011-12-25 15:28:18 +0000 |
commit | 9674dd425bfedd2db84f9d6c0e261ce4498dcf26 (patch) | |
tree | db1f3ffc4e5bdfb780a011c285c39709c06a9a1c /sys/dev/softraid_raid0.c | |
parent | 3db23b0e1d09208e37bae5a5b985ffb56823c771 (diff) |
Initialise discipline function pointers with defaults and only override
those that are needed by a specific discipline.
Diffstat (limited to 'sys/dev/softraid_raid0.c')
-rw-r--r-- | sys/dev/softraid_raid0.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c index 5f2bcc0c35e..b36303eb73e 100644 --- a/sys/dev/softraid_raid0.c +++ b/sys/dev/softraid_raid0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid0.c,v 1.23 2011/04/05 19:52:02 krw Exp $ */ +/* $OpenBSD: softraid_raid0.c,v 1.24 2011/12/25 15:28:17 jsing Exp $ */ /* * Copyright (c) 2008 Marco Peereboom <marco@peereboom.us> * @@ -65,18 +65,11 @@ sr_raid0_discipline_init(struct sr_discipline *sd) sd->sd_capabilities = SR_CAP_SYSTEM_DISK | SR_CAP_AUTO_ASSEMBLE; sd->sd_max_wu = SR_RAID0_NOWU; - /* Setup discipline pointers. */ - sd->sd_create = sr_raid0_create; - sd->sd_assemble = sr_raid0_assemble; + /* Setup discipline specific function pointers. */ sd->sd_alloc_resources = sr_raid0_alloc_resources; + sd->sd_assemble = sr_raid0_assemble; + sd->sd_create = sr_raid0_create; sd->sd_free_resources = sr_raid0_free_resources; - sd->sd_start_discipline = NULL; - sd->sd_scsi_inquiry = sr_raid_inquiry; - sd->sd_scsi_read_cap = sr_raid_read_cap; - sd->sd_scsi_tur = sr_raid_tur; - sd->sd_scsi_req_sense = sr_raid_request_sense; - sd->sd_scsi_start_stop = sr_raid_start_stop; - sd->sd_scsi_sync = sr_raid_sync; sd->sd_scsi_rw = sr_raid0_rw; sd->sd_set_chunk_state = sr_raid0_set_chunk_state; sd->sd_set_vol_state = sr_raid0_set_vol_state; |