From 9672a80ab32ce23bfa528d665a4d62625db2e8a6 Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 23 Dec 1997 19:44:45 +0000 Subject: Add a PARITITON arg to SCSI_MKFIXED, and use it to specify RAW_PART for the suopen() in sscioctl(). Now you can `scsi -f /dev/ssc -p'. --- sys/scsi/scsiconf.h | 5 +++-- sys/scsi/ssc.c | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'sys/scsi') diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 736955e..ae0468d 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsiconf.h,v 1.56 1997/09/07 15:06:08 joerg Exp $ + * $Id: scsiconf.h,v 1.57 1997/09/21 22:03:10 gibbs Exp $ */ #ifndef SCSI_SCSICONF_H #define SCSI_SCSICONF_H 1 @@ -613,10 +613,11 @@ errval scsi_change_def( struct scsi_link *sc_link, u_int32_t flags); #define SCSI_ID(DEV) (((DEV) & 0x00F00000) >> 20) #define SCSI_LUN(DEV) (((DEV) & 0x00070000) >> 16) -#define SCSI_MKFIXED(B, T, L) ( \ +#define SCSI_MKFIXED(B, T, L, P) ( \ ((B) << 24) | \ ((T) << 20) | \ ((L) << 16) | \ + (P) | \ SCSI_FIXED_MASK ) #endif /*SCSI_SCSICONF_H*/ diff --git a/sys/scsi/ssc.c b/sys/scsi/ssc.c index 7d84406..3e2fba6 100644 --- a/sys/scsi/ssc.c +++ b/sys/scsi/ssc.c @@ -49,12 +49,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *End copyright - * $Id: ssc.c,v 1.15 1997/08/02 14:33:16 bde Exp $ + * $Id: ssc.c,v 1.16 1997/09/14 03:19:39 peter Exp $ */ #include #include #include +#include #include #include #include @@ -101,10 +102,13 @@ sscioctl(dev_t dev, int cmd, caddr_t data, int fflag, struct proc *p) { if (cmd == SCIOCADDR) { - struct scsi_addr *sca = (struct scsi_addr *) data; - dev_t newdev = SCSI_MKFIXED(sca->scbus,sca->target,sca->lun); + struct scsi_addr *sca; + dev_t newdev; int ret; + sca = (struct scsi_addr *) data; + newdev = SCSI_MKFIXED(sca->scbus,sca->target,sca->lun,RAW_PART); + if (sscdev != NODEV) { suclose(sscdev, fflag, S_IFCHR, p); -- cgit v1.1