kern_conf.c (65747) | kern_conf.c (66067) |
---|---|
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 * $FreeBSD: head/sys/kern/kern_conf.c 65747 2000-09-11 17:15:33Z phk $ | 33 * $FreeBSD: head/sys/kern/kern_conf.c 66067 2000-09-19 10:28:44Z phk $ |
34 */ 35 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/sysctl.h> 39#include <sys/systm.h> 40#include <sys/module.h> 41#include <sys/malloc.h> --- 131 unchanged lines hidden (view full) --- 173minor(dev_t x) 174{ 175 if (x == NODEV) 176 return NOUDEV; 177 return(x->si_udev & 0xffff00ff); 178} 179 180int | 34 */ 35 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/sysctl.h> 39#include <sys/systm.h> 40#include <sys/module.h> 41#include <sys/malloc.h> --- 131 unchanged lines hidden (view full) --- 173minor(dev_t x) 174{ 175 if (x == NODEV) 176 return NOUDEV; 177 return(x->si_udev & 0xffff00ff); 178} 179 180int |
181lminor(dev_t x) | 181dev2unit(dev_t x) |
182{ 183 int i; 184 185 if (x == NODEV) 186 return NOUDEV; 187 i = minor(x); 188 return ((i & 0xff) | (i >> 8)); 189} 190 | 182{ 183 int i; 184 185 if (x == NODEV) 186 return NOUDEV; 187 i = minor(x); 188 return ((i & 0xff) | (i >> 8)); 189} 190 |
191int 192unit2minor(int unit) 193{ 194 195 return ((unit & 0xff) | ((unit << 8) & ~0xffff)); 196} 197 |
|
191dev_t 192makebdev(int x, int y) 193{ 194 195 if (x == umajor(NOUDEV) && y == uminor(NOUDEV)) 196 Debugger("makebdev of NOUDEV"); 197 return (makedev(bmaj2cmaj[x], y)); 198} --- 253 unchanged lines hidden --- | 198dev_t 199makebdev(int x, int y) 200{ 201 202 if (x == umajor(NOUDEV) && y == uminor(NOUDEV)) 203 Debugger("makebdev of NOUDEV"); 204 return (makedev(bmaj2cmaj[x], y)); 205} --- 253 unchanged lines hidden --- |