summaryrefslogtreecommitdiffstats
path: root/sys/scsi/ch.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-03-27 18:50:10 +0000
committerbde <bde@FreeBSD.org>1996-03-27 18:50:10 +0000
commita0f80d71f4d5419c591739bd1c8ff85a3421cd7e (patch)
treef9c3f8c23a6c10cff1491ff0a22678a78ee71464 /sys/scsi/ch.c
parent2296883240b49b7a7e262a5bb647c5de62e4d816 (diff)
downloadFreeBSD-src-a0f80d71f4d5419c591739bd1c8ff85a3421cd7e.zip
FreeBSD-src-a0f80d71f4d5419c591739bd1c8ff85a3421cd7e.tar.gz
Fixed group of disk devices (was wheel or games, now operator).
Added scsi control devices. Converted almost everything that I changed to use devfs_add_devswf() and verbose id macros. st.c: Renamed enrst* to erst* since that's what the current name is (enrst seems to be an old name).
Diffstat (limited to 'sys/scsi/ch.c')
-rw-r--r--sys/scsi/ch.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index 873f49b..06a33bd 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -2,7 +2,7 @@
* Written by grefen@convex.com (probably moved by now)
* Based on scsi drivers by Julian Elischer (julian@tfs.com)
*
- * $Id: ch.c,v 1.30 1996/03/10 07:13:05 gibbs Exp $
+ * $Id: ch.c,v 1.31 1996/03/10 18:17:53 davidg Exp $
*/
#include <sys/types.h>
@@ -51,7 +51,8 @@ struct scsi_data {
u_int16_t lsterr; /* details of lasterror */
u_char stor; /* posible Storage locations */
#ifdef DEVFS
- void *devfs_token;
+ void *c_devfs_token;
+ void *ctl_devfs_token;
#endif
};
@@ -146,7 +147,6 @@ static errval
chattach(struct scsi_link *sc_link)
{
u_int32_t unit;
- char name[32];
struct scsi_data *ch = sc_link->sd;
@@ -166,9 +166,14 @@ chattach(struct scsi_link *sc_link)
ch_registerdev(unit);
#ifdef DEVFS
- sprintf(name,"ch%ld",unit);
- ch->devfs_token = devfs_add_devsw( "/", name, &ch_cdevsw, unit << 4,
- DV_CHR, 0, 0, 0600);
+ ch->c_devfs_token = devfs_add_devswf(&ch_cdevsw, unit << 4, DV_CHR,
+ UID_ROOT, GID_OPERATOR, 0600,
+ "ch%d", unit);
+ ch->ctl_devfs_token = devfs_add_devswf(&ch_cdevsw,
+ (unit << 4) | SCSI_CONTROL_MASK,
+ DV_CHR,
+ UID_ROOT, GID_OPERATOR, 0600,
+ "ch%d.ctl", unit);
#endif
return 0;
}
OpenPOWER on IntegriCloud