subr_log.c (47625) | subr_log.c (47640) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)subr_log.c 8.1 (Berkeley) 6/10/93 | 1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)subr_log.c 8.1 (Berkeley) 6/10/93 |
34 * $Id: subr_log.c,v 1.34 1999/05/06 18:12:46 peter Exp $ | 34 * $Id: subr_log.c,v 1.35 1999/05/30 16:52:56 phk Exp $ |
35 */ 36 37/* 38 * Error log buffer for kernel printf's. 39 */ 40 41#include "opt_devfs.h" 42 --- 226 unchanged lines hidden (view full) --- 269static void *log_devfs_token; 270#endif 271 272static void log_drvinit __P((void *unused)); 273static void 274log_drvinit(unused) 275 void *unused; 276{ | 35 */ 36 37/* 38 * Error log buffer for kernel printf's. 39 */ 40 41#include "opt_devfs.h" 42 --- 226 unchanged lines hidden (view full) --- 269static void *log_devfs_token; 270#endif 271 272static void log_drvinit __P((void *unused)); 273static void 274log_drvinit(unused) 275 void *unused; 276{ |
277 dev_t dev; | |
278 279 if( ! log_devsw_installed ) { | 277 278 if( ! log_devsw_installed ) { |
280 dev = makedev(CDEV_MAJOR,0); 281 cdevsw_add(&dev,&log_cdevsw,NULL); | 279 cdevsw_add(&log_cdevsw); |
282 log_devsw_installed = 1; 283#ifdef DEVFS 284 log_devfs_token = devfs_add_devswf(&log_cdevsw, 0, DV_CHR, 285 UID_ROOT, GID_WHEEL, 0600, 286 "klog"); 287#endif 288 } 289} 290 291SYSINIT(logdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,log_drvinit,NULL) | 280 log_devsw_installed = 1; 281#ifdef DEVFS 282 log_devfs_token = devfs_add_devswf(&log_cdevsw, 0, DV_CHR, 283 UID_ROOT, GID_WHEEL, 0600, 284 "klog"); 285#endif 286 } 287} 288 289SYSINIT(logdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,log_drvinit,NULL) |