kern_cons.c (47625) | kern_cons.c (47640) |
---|---|
1/* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 | 1/* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 |
39 * $Id: cons.c,v 1.65 1999/05/08 06:39:20 phk Exp $ | 39 * $Id: cons.c,v 1.66 1999/05/30 16:52:03 phk Exp $ |
40 */ 41 42#include "opt_devfs.h" 43 44#include <sys/param.h> 45#ifdef DEVFS 46#include <sys/devfsext.h> 47#endif /*DEVFS*/ --- 380 unchanged lines hidden (view full) --- 428 } 429} 430 431static int cn_devsw_installed; 432 433static void 434cn_drvinit(void *unused) 435{ | 40 */ 41 42#include "opt_devfs.h" 43 44#include <sys/param.h> 45#ifdef DEVFS 46#include <sys/devfsext.h> 47#endif /*DEVFS*/ --- 380 unchanged lines hidden (view full) --- 428 } 429} 430 431static int cn_devsw_installed; 432 433static void 434cn_drvinit(void *unused) 435{ |
436 dev_t dev; | |
437 438 if( ! cn_devsw_installed ) { | 436 437 if( ! cn_devsw_installed ) { |
439 dev = makedev(CDEV_MAJOR,0); 440 cdevsw_add(&dev,&cn_cdevsw,NULL); | 438 cdevsw_add(&cn_cdevsw); |
441 cn_devsw_installed = 1; 442#ifdef DEVFS 443 cn_devfs_token = devfs_add_devswf(&cn_cdevsw, 0, DV_CHR, 444 UID_ROOT, GID_WHEEL, 0600, 445 "console"); 446#endif 447 } 448} 449 450SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL) 451 452 | 439 cn_devsw_installed = 1; 440#ifdef DEVFS 441 cn_devfs_token = devfs_add_devswf(&cn_cdevsw, 0, DV_CHR, 442 UID_ROOT, GID_WHEEL, 0600, 443 "console"); 444#endif 445 } 446} 447 448SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL) 449 450 |