diff options
author | dufault <dufault@FreeBSD.org> | 1995-05-03 18:09:20 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1995-05-03 18:09:20 +0000 |
commit | 9d5087634af5b60fb1b35e627b1e09dd5c178413 (patch) | |
tree | 1681cda3a482fda605182f6fe8d420efbc5839e6 /sys/scsi/su.c | |
parent | da1f0a96f4ab656828dada409b64a653945a70cb (diff) | |
download | FreeBSD-src-9d5087634af5b60fb1b35e627b1e09dd5c178413.zip FreeBSD-src-9d5087634af5b60fb1b35e627b1e09dd5c178413.tar.gz |
Moved unit definitions out of scsiconf.h;
Added CONTROL device that only does user-ioctl and nothing else;
Added protection so user-ioctl requires write access;
Clean up scsiconf.h a little. It needs more work.
Diffstat (limited to 'sys/scsi/su.c')
-rw-r--r-- | sys/scsi/su.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/scsi/su.c b/sys/scsi/su.c index 0211295..dd73c2b 100644 --- a/sys/scsi/su.c +++ b/sys/scsi/su.c @@ -44,7 +44,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: su.c,v 1.3 1995/01/08 15:56:10 dufault Exp $ + * $Id: su.c,v 1.4 1995/03/04 20:51:07 dufault Exp $ * * Tabstops 4 */ @@ -58,6 +58,19 @@ #include <sys/buf.h> #include <sys/systm.h> +/* Build an old style device number (unit encoded in the minor number) + * from a base old one (no flag bits) and a full new one + * (BUS, LUN, TARG in the minor number, and flag bits). + * + * OLDDEV has the major number and device unit only. It was constructed + * at attach time and is stored in the scsi_link structure. + * + * NEWDEV can have whatever in it, but only the old control flags and the + * super bit are present. IT CAN'T HAVE ANY UNIT INFORMATION or you'll + * wind up with the wrong unit. + */ +#define OLD_DEV(NEWDEV, OLDDEV) ((OLDDEV) | ((NEWDEV) & 0x080000FF)) + /* XXX: These are taken from, and perhaps belong in, conf.c */ #define nxopen (d_open_t *)enxio |