diff options
author | scrappy <scrappy@FreeBSD.org> | 1996-03-28 14:33:59 +0000 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 1996-03-28 14:33:59 +0000 |
commit | 0567ca9a1089852de11792392f91fb2ab6b61a5a (patch) | |
tree | 76c7cd93029f75249004b135fe2bec1caa30f78d /sys/scsi/cd.c | |
parent | 745bb4c905709976ab384f4b85c1564cb2a78513 (diff) | |
download | FreeBSD-src-0567ca9a1089852de11792392f91fb2ab6b61a5a.zip FreeBSD-src-0567ca9a1089852de11792392f91fb2ab6b61a5a.tar.gz |
Using devfs_add_devswf() instead of devfs_add_devsw()
Reviewed by: julian@freebsd.org
Diffstat (limited to 'sys/scsi/cd.c')
-rw-r--r-- | sys/scsi/cd.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 04f5ea3..235ecc3 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: cd.c,v 1.66 1996/02/13 03:46:48 ache Exp $ + * $Id: cd.c,v 1.67 1996/03/10 07:13:04 gibbs Exp $ */ #include "opt_bounce.h" @@ -206,7 +206,6 @@ cdattach(struct scsi_link *sc_link) u_int32_t unit; struct cd_parms *dp; struct scsi_data *cd = sc_link->sd; - char name[32]; unit = sc_link->dev_unit; dp = &(cd->params); @@ -243,25 +242,18 @@ cdattach(struct scsi_link *sc_link) #ifdef DEVFS #define CD_UID 0 #define CD_GID 13 - sprintf(name, "rcd%da",unit); - cd->ra_devfs_token = devfs_add_devsw( - "/", name, &cd_cdevsw, unit * 8, - DV_CHR, CD_UID, CD_GID, 0660); - - sprintf(name, "rcd%dc",unit); - cd->rc_devfs_token = devfs_add_devsw( - "/", name, &cd_cdevsw, (unit * 8 ) + RAW_PART, - DV_CHR, CD_UID, CD_GID, 0600); - - sprintf(name, "cd%da",unit); - cd->a_devfs_token = devfs_add_devsw( - "/", name, &cd_bdevsw, (unit * 8 ) + 0, - DV_BLK, CD_UID, CD_GID, 0660); - - sprintf(name, "cd%dc",unit); - cd->c_devfs_token = devfs_add_devsw( - "/", name, &cd_bdevsw, (unit * 8 ) + RAW_PART, - DV_BLK, CD_UID, CD_GID, 0600); + cd->ra_devfs_token = + devfs_add_devswf(&cd_cdevsw, unit * 8, DV_CHR, CD_UID, + CD_GID, 0660, "rcd%da", unit); + cd->rc_devfs_token = + devfs_add_devswf(&cd_cdevsw, (unit * 8 ) + RAW_PART, DV_CHR, + CD_UID, CD_GID, 0600, "rcd%dc", unit); + cd->a_devfs_token = + devfs_add_devswf(&cd_bdevsw, unit * 8, DV_BLK, CD_UID, + CD_GID, 0660, "cd%da", unit); + cd->c_devfs_token = + devfs_add_devswf(&cd_bdevsw, (unit * 8 ) + RAW_PART, DV_BLK, + CD_UID, CD_GID, 0600, "cd%dc", unit); #endif return 0; |