diff options
author | bde <bde@FreeBSD.org> | 1996-03-27 18:50:10 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-03-27 18:50:10 +0000 |
commit | a0f80d71f4d5419c591739bd1c8ff85a3421cd7e (patch) | |
tree | f9c3f8c23a6c10cff1491ff0a22678a78ee71464 /sys/scsi/sd.c | |
parent | 2296883240b49b7a7e262a5bb647c5de62e4d816 (diff) | |
download | FreeBSD-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/sd.c')
-rw-r--r-- | sys/scsi/sd.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 35177a1..56d0b15 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.85 1996/03/02 18:24:13 peter Exp $ + * $Id: sd.c,v 1.86 1996/03/10 07:13:12 gibbs Exp $ */ #include "opt_bounce.h" @@ -84,8 +84,9 @@ struct scsi_data { struct buf_queue_head buf_queue; int dkunit; /* disk stats unit number */ #ifdef DEVFS - void *c_devfs_token; void *b_devfs_token; + void *c_devfs_token; + void *ctl_devfs_token; #endif }; @@ -195,7 +196,6 @@ sdattach(struct scsi_link *sc_link) struct disk_parms *dp; #ifdef DEVFS int mynor; - char name[32]; #endif struct scsi_data *sd = sc_link->sd; @@ -239,11 +239,18 @@ sdattach(struct scsi_link *sc_link) #ifdef DEVFS mynor = dkmakeminor(unit, WHOLE_DISK_SLICE, RAW_PART); - sprintf(name, "rsd%d", unit); - sd->b_devfs_token = devfs_add_devsw("/", name + 1, &sd_bdevsw, mynor, - DV_BLK, 0, 0, 0640); - sd->c_devfs_token = devfs_add_devsw("/", name, &sd_cdevsw, mynor, - DV_CHR, 0, 0, 0640); + sd->b_devfs_token = devfs_add_devswf(&sd_bdevsw, mynor, DV_BLK, + UID_ROOT, GID_OPERATOR, 0640, + "sd%d", unit); + sd->c_devfs_token = devfs_add_devswf(&sd_cdevsw, mynor, DV_CHR, + UID_ROOT, GID_OPERATOR, 0640, + "rsd%d", unit); + mynor = dkmakeminor(unit, 0, 0); /* XXX */ + sd->ctl_devfs_token = devfs_add_devswf(&sd_cdevsw, + mynor | SCSI_CONTROL_MASK, + DV_CHR, + UID_ROOT, GID_WHEEL, 0600, + "rsd%d.ctl", unit); #endif return 0; |