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/gnu | |
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/gnu')
-rw-r--r-- | sys/gnu/i386/isa/dgb.c | 45 | ||||
-rw-r--r-- | sys/gnu/i386/isa/nic3008.c | 14 | ||||
-rw-r--r-- | sys/gnu/i386/isa/nic3009.c | 14 | ||||
-rw-r--r-- | sys/gnu/isdn/iispy.c | 11 | ||||
-rw-r--r-- | sys/gnu/isdn/iitel.c | 11 | ||||
-rw-r--r-- | sys/gnu/isdn/iitty.c | 17 |
6 files changed, 58 insertions, 54 deletions
diff --git a/sys/gnu/i386/isa/dgb.c b/sys/gnu/i386/isa/dgb.c index 42810f0..ec67dce 100644 --- a/sys/gnu/i386/isa/dgb.c +++ b/sys/gnu/i386/isa/dgb.c @@ -1,5 +1,5 @@ /*- - * dgb.c $Id: dgb.c,v 1.14 1995/12/17 21:14:29 phk Exp $ + * dgb.c $Id: dgb.c,v 1.15 1995/12/29 13:21:10 bde Exp $ * * Digiboard driver. * @@ -457,7 +457,6 @@ dgbattach(dev) ushort *pstat; int lowwater; int nports=0; - char name[32]; if(sc->status!=ENABLED) { DPRINT2("dbg%d: try to attach a disabled card\n",unit); @@ -855,25 +854,29 @@ load_fep: port->it_out = port->it_in; #ifdef DEVFS /*XXX*/ /* fix the minor numbers */ - sprintf(name,"dgb%d.%d",unit,i); - port->devfs_token.tty = devfs_add_devsw("/",name, - &dgb_cdevsw,(unit*32)+i, /*mytical number */ - DV_CHR, 0, 0, 0600); - - sprintf(name,"idgb%d.%d",unit,i); - port->devfs_token.tty = devfs_add_devsw("/",name, - &dgb_cdevsw,(unit*32)+i + 64, /*mytical number */ - DV_CHR, 0, 0, 0600); - - sprintf(name,"ldgb%d.%d",unit,i); - port->devfs_token.tty = devfs_add_devsw("/",name, - &dgb_cdevsw,(unit*32)+i + 128, /*mytical number */ - DV_CHR, 0, 0, 0600); - - sprintf(name,"dgbcua%d.%d",unit,i); - port->devfs_token.tty = devfs_add_devsw("/",name, - &dgb_cdevsw,(unit*32)+i + 192, /*mytical number */ - DV_CHR, 0, 0, 0600); + port->devfs_token.tty = + devfs_add_devswf(&dgb_cdevsw, + (unit*32)+i,/*mytical number*/ + DV_CHR, 0, 0, 0600, "dgb%d.%d", unit, + i); + + port->devfs_token.tty = + devfs_add_devswf(&dgb_cdevsw, + (unit*32)+i+64,/*mytical number*/ + DV_CHR, 0, 0, 0600, idgb%d.%d", unit, + i); + + port->devfs_token.tty = + devfs_add_devswf(&dgb_cdevsw, + (unit*32)+i+128,/*mytical number*/ + DV_CHR, 0, 0, 0600, "ldgb%d.%d", unit, + i); + + port->devfs_token.tty = + devfs_add_devswf(&dgb_cdevsw, + (unit*32)+i+192,/*mytical number*/ + DV_CHR, 0, 0, 0600, "dgbcua%d.%d", + unit, i); #endif } diff --git a/sys/gnu/i386/isa/nic3008.c b/sys/gnu/i386/isa/nic3008.c index 27bd01b..b3b8907 100644 --- a/sys/gnu/i386/isa/nic3008.c +++ b/sys/gnu/i386/isa/nic3008.c @@ -1,6 +1,6 @@ -static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.13 1995/12/08 23:19:29 phk Exp $"; +static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.14 1995/12/17 21:14:34 phk Exp $"; /******************************************************************************* - * II - Version 0.1 $Revision: 1.13 $ $State: Exp $ + * II - Version 0.1 $Revision: 1.14 $ $State: Exp $ * * Copyright 1994 Dietmar Friede ******************************************************************************* @@ -10,6 +10,9 @@ static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.13 1995/12/08 23:19:29 phk * ******************************************************************************* * $Log: nic3008.c,v $ + * Revision 1.14 1995/12/17 21:14:34 phk + * Staticize. + * * Revision 1.13 1995/12/08 23:19:29 phk * Julian forgot to make the *devsw structures static. * @@ -265,7 +268,6 @@ nicattach(struct isa_device * is) dpr_type *dpr; int cn; isdn_ctrl_t *ctrl0, *ctrl1; - char name[32]; sc = &nic_sc[is->id_unit]; dpr = sc->sc_dpr; @@ -298,9 +300,9 @@ nicattach(struct isa_device * is) dpr->int_flg_pc = 0xff; reset_req(sc, MBX_MU, 4); #ifdef DEVFS - sprintf(name,"nic%d",is->id_unit); - sc->devfs_token = devfs_add_devsw( "/isdn", name, - &nic_cdevsw,is->id_unit, DV_CHR, 0, 0, 0600 ); + sc->devfs_token = + devfs_add_devswf(&nic_cdevsw, is->id_unit, DV_CHR, 0, 0, + 0600, "/isdn/nic%d", is->id_unit); #endif return (1); } diff --git a/sys/gnu/i386/isa/nic3009.c b/sys/gnu/i386/isa/nic3009.c index 75d0440..314b645 100644 --- a/sys/gnu/i386/isa/nic3009.c +++ b/sys/gnu/i386/isa/nic3009.c @@ -1,6 +1,6 @@ -static char nic39_id[] = "@(#)$Id: nic3009.c,v 1.13 1995/12/08 23:19:30 phk Exp $"; +static char nic39_id[] = "@(#)$Id: nic3009.c,v 1.14 1995/12/17 21:14:36 phk Exp $"; /******************************************************************************* - * II - Version 0.1 $Revision: 1.13 $ $State: Exp $ + * II - Version 0.1 $Revision: 1.14 $ $State: Exp $ * * Copyright 1994 Dietmar Friede ******************************************************************************* @@ -10,6 +10,9 @@ static char nic39_id[] = "@(#)$Id: nic3009.c,v 1.13 1995/12/08 23:19:30 phk * ******************************************************************************* * $Log: nic3009.c,v $ + * Revision 1.14 1995/12/17 21:14:36 phk + * Staticize. + * * Revision 1.13 1995/12/08 23:19:30 phk * Julian forgot to make the *devsw structures static. * @@ -271,7 +274,6 @@ nnicattach(struct isa_device * is) struct nnic_softc *sc; int cn; isdn_ctrl_t *ctrl0, *ctrl1; - char name[32]; sc = &nnic_sc[is->id_unit]; sc->sc_ctrl = -1; @@ -299,9 +301,9 @@ nnicattach(struct isa_device * is) ctrl0->o_len = ctrl1->o_len = -1; sc->sc_flags= LOAD_ENTITY; #ifdef DEVFS - sprintf(name,"nnic%d",is->id_unit); - sc->devfs_token = devfs_add_devsw("/isdn",name, - &nnic_cdevsw, is->id_unit, DV_CHR, 0, 0, 0600 ); + sc->devfs_token = + devfs_add_devswf(&nnic_cdevsw, is->id_unit, DV_CHR, 0, 0, + 0600, "/isdn/nnic%d", is->id_unit); #endif return (1); diff --git a/sys/gnu/isdn/iispy.c b/sys/gnu/isdn/iispy.c index 502e765..170281b 100644 --- a/sys/gnu/isdn/iispy.c +++ b/sys/gnu/isdn/iispy.c @@ -1,6 +1,6 @@ -static char _ispyid[] = "@(#)$Id: iispy.c,v 1.9 1995/12/08 23:19:40 phk Exp $"; +static char _ispyid[] = "@(#)$Id: iispy.c,v 1.10 1995/12/17 21:17:43 phk Exp $"; /******************************************************************************* - * II - Version 0.1 $Revision: 1.9 $ $State: Exp $ + * II - Version 0.1 $Revision: 1.10 $ $State: Exp $ * * Copyright 1994 Dietmar Friede ******************************************************************************* @@ -74,7 +74,6 @@ static struct cdevsw ispy_cdevsw = int ispyattach(int ap) { - char name[32]; struct ispy_data *ispy; if(next_if >= NISPY) @@ -83,9 +82,9 @@ ispyattach(int ap) ispy->state= 0; ispy_applnr= ap; #ifdef DEVFS - sprintf(name,"ispy%d",next_if); - ispy->devfs_token =devfs_add_devsw("/isdn",name,&ispy_cdevsw,next_if, - DV_CHR, 0, 0, 0600); + ispy->devfs_token = + devfs_add_devswf(&ispy_cdevsw, next_if, DV_CHR, 0, 0, + 0600, "isdn/ispy%d", next_if); #endif return(next_if++); } diff --git a/sys/gnu/isdn/iitel.c b/sys/gnu/isdn/iitel.c index 709fcc8..61e52e6 100644 --- a/sys/gnu/isdn/iitel.c +++ b/sys/gnu/isdn/iitel.c @@ -1,6 +1,6 @@ -static char _itelid[] = "@(#)$Id: iitel.c,v 1.10 1995/12/08 23:19:42 phk Exp $"; +static char _itelid[] = "@(#)$Id: iitel.c,v 1.11 1995/12/17 21:17:44 phk Exp $"; /******************************************************************************* - * II - Version 0.1 $Revision: 1.10 $ $State: Exp $ + * II - Version 0.1 $Revision: 1.11 $ $State: Exp $ * * Copyright 1994 Dietmar Friede ******************************************************************************* @@ -67,7 +67,6 @@ int itelattach(int ap) { struct itel_data *itel; - char name[32]; if(next_if >= NITEL) return(-1); @@ -76,9 +75,9 @@ itelattach(int ap) itel->state= 0; applnr[next_if]= ap; #ifdef DEVFS - sprintf(name,"itel%d",next_if); - itel->devfs_token = devfs_add_devsw("/isdn",name,&itel_cdevsw,next_if, - DV_CHR, 0, 0, 0600); + itel->devfs_token = + devfs_add_devswf(&itel_cdevsw, next_if, DV_CHR, 0, 0, + 0600, "isdn/itel%d", next_if); #endif return(next_if++); } diff --git a/sys/gnu/isdn/iitty.c b/sys/gnu/isdn/iitty.c index ad5329c..491b022 100644 --- a/sys/gnu/isdn/iitty.c +++ b/sys/gnu/isdn/iitty.c @@ -1,6 +1,6 @@ -static char _ittyid[] = "@(#)$Id: iitty.c,v 1.18 1995/12/10 15:54:13 bde Exp $"; +static char _ittyid[] = "@(#)$Id: iitty.c,v 1.19 1995/12/17 21:17:47 phk Exp $"; /******************************************************************************* - * II - Version 0.1 $Revision: 1.18 $ $State: Exp $ + * II - Version 0.1 $Revision: 1.19 $ $State: Exp $ * * Copyright 1994 Dietmar Friede ******************************************************************************* @@ -66,18 +66,17 @@ static void *devfs_token_out[NITY]; int ityattach(int ap) { - char name[32]; if(next_if >= NITY) return(-1); applnr[next_if]= ap; #ifdef DEVFS - sprintf(name,"ity%d",next_if); - devfs_token[next_if] = devfs_add_devsw("/isdn",name, - &ity_cdevsw,next_if, DV_CHR, 0, 0, 0600); - sprintf(name,"Oity%d",next_if); /* XXX find out real name */ - devfs_token[next_if] = devfs_add_devsw("/isdn",name, - &ity_cdevsw,(next_if | 0x80), DV_CHR, 0, 0, 0600); + devfs_token[next_if] = + devfs_add_devswf(&ity_cdevsw, next_if, DV_CHR, 0, 0, + 0600, "isdn/ity%d", next_if); + devfs_token[next_if] = + devfs_add_devswf(&ity_cdevsw,(next_if | 0x80), DV_CHR, 0, 0, + 0600, "isdn/Oity%d", next_if); #endif return(next_if++); } |