mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 12:28:58 +00:00
Introduce a wormunit() so the control device will work.
This commit is contained in:
parent
5c7acd6044
commit
644104e65f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13167
@ -37,7 +37,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: worm.c,v 1.15 1995/12/08 23:22:33 phk Exp $
|
||||
* $Id: worm.c,v 1.16 1995/12/14 09:54:35 phk Exp $
|
||||
*/
|
||||
|
||||
/* XXX This is PRELIMINARY.
|
||||
@ -96,6 +96,11 @@ static struct cdevsw worm_cdevsw =
|
||||
seltrue, nommap, wormstrategy };
|
||||
|
||||
|
||||
static int
|
||||
wormunit(dev_t dev) {
|
||||
return (minor(dev) & ~(SCSI_FIXED_MASK|SCSI_CONTROL_MASK));
|
||||
}
|
||||
|
||||
SCSI_DEVICE_ENTRIES(worm)
|
||||
|
||||
static struct scsi_device worm_switch =
|
||||
@ -113,7 +118,7 @@ static struct scsi_device worm_switch =
|
||||
wormopen,
|
||||
sizeof(struct scsi_data),
|
||||
T_WORM,
|
||||
0,
|
||||
wormunit,
|
||||
0,
|
||||
worm_open,
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user