diff options
author | 2009-06-03 06:28:56 +0000 | |
---|---|---|
committer | 2009-06-03 06:28:56 +0000 | |
commit | 7f449d7f590ab725cc55a9a46c31d0ba7dfc87ee (patch) | |
tree | 0e0f19abbaabc2012f5f1daeca4e83797b54e698 /sys/dev/softraid.c | |
parent | Add a callback specifically for softraid. If you touch this kittens will (diff) | |
download | wireguard-openbsd-7f449d7f590ab725cc55a9a46c31d0ba7dfc87ee.tar.xz wireguard-openbsd-7f449d7f590ab725cc55a9a46c31d0ba7dfc87ee.zip |
Start using the shiny new function pointer to determine if we have disk
arrivals or departures.
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index a9ec2bf9893..d51333b396c 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.141 2009/06/03 02:55:04 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.142 2009/06/03 06:28:56 marco Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -1214,6 +1214,23 @@ struct scsi_device sr_dev = { NULL, NULL, NULL, NULL }; +void sr_disk_attach(struct disk *, int); + +extern void (*softraid_disk_attach)(struct disk *, int); + +void +sr_disk_attach(struct disk *diskp, int action) +{ + switch (action) { + case 1: + /* disk arrived */ + break; + case -1: + /* disk departed */ + break; + } +} + int sr_match(struct device *parent, void *match, void *aux) { @@ -1236,6 +1253,8 @@ sr_attach(struct device *parent, struct device *self, void *aux) printf("\n"); + softraid_disk_attach = sr_disk_attach; + sr_boot_assembly(sc); } |