summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-12-23 19:44:45 +0000
committerbrian <brian@FreeBSD.org>1997-12-23 19:44:45 +0000
commit9672a80ab32ce23bfa528d665a4d62625db2e8a6 (patch)
treef14ee07c95baae03c0284b8678fb59b2086d75e2 /sys/scsi
parentb24853a7102a1c4494d9c7a93687004535ec8c4c (diff)
downloadFreeBSD-src-9672a80ab32ce23bfa528d665a4d62625db2e8a6.zip
FreeBSD-src-9672a80ab32ce23bfa528d665a4d62625db2e8a6.tar.gz
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'.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsiconf.h5
-rw-r--r--sys/scsi/ssc.c10
2 files changed, 10 insertions, 5 deletions
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 <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
+#include <sys/disklabel.h>
#include <sys/scsiio.h>
#include <sys/kernel.h>
#include <sys/stat.h>
@@ -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);
OpenPOWER on IntegriCloud