From: matthieu Date: Sun, 9 Apr 2000 21:07:46 +0000 (+0000) Subject: fix ulpt major # allocation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f2085de0834013061d8ba43bbd855f746636f400;p=openbsd fix ulpt major # allocation --- diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV index d434ca5898e..99002590741 100644 --- a/etc/etc.i386/MAKEDEV +++ b/etc/etc.i386/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: MAKEDEV,v 1.77 2000/03/29 21:46:07 aaron Exp $ +# $OpenBSD: MAKEDEV,v 1.78 2000/04/09 21:08:26 matthieu Exp $ # $NetBSD: MAKEDEV,v 1.40 1996/03/31 00:50:47 perry Exp $ # # Copyright (c) 1990 The Regents of the University of California. @@ -249,7 +249,7 @@ uhid*) ulpt*) rm -f ulpt$unit - mknod ulpt$unit c 63 $unit + mknod ulpt$unit c 64 $unit chown root.wheel ulpt$unit chmod 600 ulpt$unit ;; diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c index f5b74afd8a7..e0b5252644d 100644 --- a/sys/arch/i386/i386/conf.c +++ b/sys/arch/i386/i386/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.58 2000/02/21 08:15:32 mjacob Exp $ */ +/* $OpenBSD: conf.c,v 1.59 2000/04/09 21:07:46 matthieu Exp $ */ /* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */ /* @@ -200,6 +200,8 @@ cdev_decl(usb); cdev_decl(uhid); #include "ugen.h" cdev_decl(ugen); +#include "ulpt.h" +cdev_decl(ulpt); #ifdef IPFILTER #define NIPF 1 @@ -300,6 +302,7 @@ struct cdevsw cdevsw[] = cdev_usb_init(NUSB,usb), /* 61: USB controller */ cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_ugen_init(NUGEN,ugen), /* 63: USB generic driver */ + cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/sys/conf.h b/sys/sys/conf.h index df18db1c32a..94c151da439 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.35 2000/02/21 08:14:13 mjacob Exp $ */ +/* $OpenBSD: conf.h,v 1.36 2000/04/09 21:07:46 matthieu Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -376,6 +376,12 @@ void randomattach __P((void)); (dev_type_stop((*))) enodev, 0, dev_init(c,n,select), \ (dev_type_mmap((*))) enodev } +/* open, close, write, ioctl */ +#define cdev_ulpt_init(c,n) { \ + dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ + dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ + 0, (dev_type_select((*))) enodev, (dev_type_mmap((*))) enodev } + #define cdev_usbdev_init(c,n) cdev_random_init(c,n) #define cdev_ugen_init(c,n) cdev_random_init(c,n)