1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

use devfs_add_devswf and avoid local variable.

This commit is contained in:
Poul-Henning Kamp 1996-02-13 14:15:13 +00:00
parent 4f9a3d482f
commit 01a3e1a590
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14086
3 changed files with 9 additions and 15 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.140 1996/02/05 14:08:39 ache Exp $
* $Id: syscons.c,v 1.141 1996/02/08 06:30:31 pst Exp $
*/
#include "sc.h"
@ -295,7 +295,6 @@ scattach(struct isa_device *dev)
{
scr_stat *scp;
int vc;
char name[32];
scinit();
configuration = dev->id_flags;
@ -359,9 +358,8 @@ scattach(struct isa_device *dev)
#ifdef DEVFS
for ( vc = 0 ; vc < MAXCONS; vc++) {
sprintf(name,"ttyv%x", vc);
sc_devfs_token[vc] = devfs_add_devsw("/" ,name, &scdevsw, vc,
DV_CHR, 0, 0, 0600 );
sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc,
DV_CHR, 0, 0, 0600, "ttyv%n", vc );
}
#endif
{

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.140 1996/02/05 14:08:39 ache Exp $
* $Id: syscons.c,v 1.141 1996/02/08 06:30:31 pst Exp $
*/
#include "sc.h"
@ -295,7 +295,6 @@ scattach(struct isa_device *dev)
{
scr_stat *scp;
int vc;
char name[32];
scinit();
configuration = dev->id_flags;
@ -359,9 +358,8 @@ scattach(struct isa_device *dev)
#ifdef DEVFS
for ( vc = 0 ; vc < MAXCONS; vc++) {
sprintf(name,"ttyv%x", vc);
sc_devfs_token[vc] = devfs_add_devsw("/" ,name, &scdevsw, vc,
DV_CHR, 0, 0, 0600 );
sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc,
DV_CHR, 0, 0, 0600, "ttyv%n", vc );
}
#endif
{

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.140 1996/02/05 14:08:39 ache Exp $
* $Id: syscons.c,v 1.141 1996/02/08 06:30:31 pst Exp $
*/
#include "sc.h"
@ -295,7 +295,6 @@ scattach(struct isa_device *dev)
{
scr_stat *scp;
int vc;
char name[32];
scinit();
configuration = dev->id_flags;
@ -359,9 +358,8 @@ scattach(struct isa_device *dev)
#ifdef DEVFS
for ( vc = 0 ; vc < MAXCONS; vc++) {
sprintf(name,"ttyv%x", vc);
sc_devfs_token[vc] = devfs_add_devsw("/" ,name, &scdevsw, vc,
DV_CHR, 0, 0, 0600 );
sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc,
DV_CHR, 0, 0, 0600, "ttyv%n", vc );
}
#endif
{