now that mem_no is emitted by config(8), there is no reason to keep

copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
This commit is contained in:
jdolecek 2002-10-28 13:33:07 +00:00
parent ae48183d48
commit 5ab7d519a3
3 changed files with 2 additions and 58 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.malta,v 1.5 2002/09/09 06:40:42 simonb Exp $
# $NetBSD: files.malta,v 1.6 2002/10/28 13:33:07 jdolecek Exp $
file arch/evbmips/malta/malta_bus_io.c
file arch/evbmips/malta/malta_bus_mem.c
@ -11,7 +11,6 @@ file arch/evbmips/malta/machdep.c
file arch/mips/mips/bus_dma.c
file arch/evbmips/evbmips/clock.c
file arch/evbmips/evbmips/conf_common.c
file arch/evbmips/evbmips/disksubr.c
file arch/evbmips/evbmips/interrupt.c
file arch/evbmips/evbmips/yamon.c # XXX should be in arch/mips/yamon ?

View File

@ -1,4 +1,4 @@
# $NetBSD: files.pb1000,v 1.3 2002/09/09 06:40:42 simonb Exp $
# $NetBSD: files.pb1000,v 1.4 2002/10/28 13:33:07 jdolecek Exp $
file arch/evbmips/alchemy/pb1000_intr.c
@ -7,7 +7,6 @@ file arch/evbmips/alchemy/machdep.c
file arch/mips/mips/bus_dma.c
file arch/evbmips/evbmips/clock.c
file arch/evbmips/evbmips/conf_common.c
file arch/evbmips/evbmips/disksubr.c
file arch/evbmips/evbmips/interrupt.c
file arch/evbmips/evbmips/yamon.c

View File

@ -1,54 +0,0 @@
/* $NetBSD: conf_common.c,v 1.4 2002/09/06 13:18:43 gehenna Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Ralph Campbell.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: conf_common.c,v 1.4 2002/09/06 13:18:43 gehenna Exp $");
#include <sys/param.h>
#include <sys/conf.h>
/*
* Returns true if dev is /dev/mem or /dev/kmem.
*/
int
iskmemdev(dev_t dev)
{
return (major(dev) == mem_no && minor(dev) < 2);
}