kern_conf.c (12954) | kern_conf.c (12968) |
---|---|
1/*- 2 * Parts Copyright (c) 1995 Terrence R. Lambert 3 * Copyright (c) 1995 Julian R. Elischer 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 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 * | 1/*- 2 * Parts Copyright (c) 1995 Terrence R. Lambert 3 * Copyright (c) 1995 Julian R. Elischer 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 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 * $Id: kern_conf.c,v 1.7 1995/12/13 15:12:48 julian Exp $ | 33 * $Id: kern_conf.c,v 1.8 1995/12/21 20:09:39 julian Exp $ |
34 */ 35 36#include <sys/param.h> 37#include <sys/types.h> 38#include <sys/systm.h> 39#include <sys/conf.h> 40#include <sys/vnode.h> 41 --- 57 unchanged lines hidden (view full) --- 99/* 100 * Routine to convert from character to block device number. 101 * 102 * A minimal stub routine can always return NODEV. 103 */ 104dev_t 105chrtoblk(dev_t dev) 106{ | 34 */ 35 36#include <sys/param.h> 37#include <sys/types.h> 38#include <sys/systm.h> 39#include <sys/conf.h> 40#include <sys/vnode.h> 41 --- 57 unchanged lines hidden (view full) --- 99/* 100 * Routine to convert from character to block device number. 101 * 102 * A minimal stub routine can always return NODEV. 103 */ 104dev_t 105chrtoblk(dev_t dev) 106{ |
107 int blkmaj; | |
108 struct bdevsw *bd; 109 struct cdevsw *cd; 110 111 if(cd = cdevsw[major(dev)]) { 112 if ( (bd = cd->d_bdev) ) 113 return(makedev(bd->d_maj,minor(dev))); 114 } 115 return(NODEV); --- 45 unchanged lines hidden --- | 107 struct bdevsw *bd; 108 struct cdevsw *cd; 109 110 if(cd = cdevsw[major(dev)]) { 111 if ( (bd = cd->d_bdev) ) 112 return(makedev(bd->d_maj,minor(dev))); 113 } 114 return(NODEV); --- 45 unchanged lines hidden --- |