diff options
author | joerg <joerg@FreeBSD.org> | 1996-01-02 15:44:00 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-01-02 15:44:00 +0000 |
commit | 4bdf910d5cb02a9cd42756df3e231061c02a0ccc (patch) | |
tree | d363d3fcbaa269516b21693225356c2d1b47236b /sys | |
parent | 88201ac426bac9d14bb68bb46cc0651a1f4535fd (diff) | |
download | FreeBSD-src-4bdf910d5cb02a9cd42756df3e231061c02a0ccc.zip FreeBSD-src-4bdf910d5cb02a9cd42756df3e231061c02a0ccc.tar.gz |
Introduce a wormunit() so the control device will work.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/worm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c index baafbae..4e80071 100644 --- a/sys/scsi/worm.c +++ b/sys/scsi/worm.c @@ -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, |