diff options
author | scrappy <scrappy@FreeBSD.org> | 1996-03-28 14:29:52 +0000 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 1996-03-28 14:29:52 +0000 |
commit | 415585985cb93ec4bd441c45c7bbd43c2529256d (patch) | |
tree | a799d7ab93b91102069e46ed96392e309b7b469f /sys/dev/mcd | |
parent | f55298f39fa39052b4a4bb6f1f3a18aa12d6b771 (diff) | |
download | FreeBSD-src-415585985cb93ec4bd441c45c7bbd43c2529256d.zip FreeBSD-src-415585985cb93ec4bd441c45c7bbd43c2529256d.tar.gz |
Switched from using devfs_add_sw() to using devfs_add_swf()
Reviewed by: julian@freebsd.org
Diffstat (limited to 'sys/dev/mcd')
-rw-r--r-- | sys/dev/mcd/mcd.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 645a7eb..a364c04 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -40,7 +40,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.73 1996/02/27 19:08:39 ache Exp $ + * $Id: mcd.c,v 1.74 1996/03/17 13:33:42 ache Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -275,7 +275,6 @@ int mcd_attach(struct isa_device *dev) { int unit = dev->id_unit; struct mcd_data *cd = mcd_data + unit; - char name[32]; cd->iobase = dev->id_iobase; cd->flags |= MCDINIT; @@ -291,25 +290,18 @@ int mcd_attach(struct isa_device *dev) #ifdef DEVFS #define MCD_UID 0 #define MCD_GID 13 - sprintf(name, "rmcd%da",unit); - cd->ra_devfs_token = devfs_add_devsw( - "/", name, &mcd_cdevsw, (unit * 8 ) + 0, - DV_CHR, MCD_UID, MCD_GID, 0600); - - sprintf(name, "rmcd%dc",unit); - cd->rc_devfs_token = devfs_add_devsw( - "/", name, &mcd_cdevsw, (unit * 8 ) + RAW_PART, - DV_CHR, MCD_UID, MCD_GID, 0600); - - sprintf(name, "mcd%da",unit); - cd->a_devfs_token = devfs_add_devsw( - "/", name, &mcd_bdevsw, (unit * 8 ) + 0, - DV_BLK, MCD_UID, MCD_GID, 0600); - - sprintf(name, "mcd%dc",unit); - cd->c_devfs_token = devfs_add_devsw( - "/", name, &mcd_bdevsw, (unit * 8 ) + RAW_PART, - DV_BLK, MCD_UID, MCD_GID, 0600); + cd->ra_devfs_token = + devfs_add_devswf(&mcd_cdevsw, (unit * 8 ) + 0, DV_CHR, MCD_UID, + MCD_GID, 0600, "rmcd%da", unit); + cd->rc_devfs_token = + devfs_add_devswf(&mcd_cdevsw, (unit * 8 ) + RAW_PART, DV_CHR, + MCD_UID, MCD_GID, 0600, "rmcd%dc", unit); + cd->a_devfs_token = + devfs_add_devswf(&mcd_bdevsw, (unit * 8 ) + 0, DV_BLK, MCD_UID, + MCD_GID, 0600, "mcd%da", unit); + cd->c_devfs_token = + devfs_add_devswf(&mcd_bdevsw, (unit * 8 ) + RAW_PART, DV_BLK, + MCD_UID, MCD_GID, 0600, "mcd%dc", unit); #endif return 1; } |