diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-09-26 14:03:56 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-09-26 14:03:56 +0000 |
commit | 3cfa686a50030503dc2ff2f9a0111c54b9561795 (patch) | |
tree | 55a18b8eae8a4dda03700a902224aadc50ecbe3f | |
parent | a4ba45aa8ff49696e29a6ed776ac4323979b6a0b (diff) |
Implement getnulldev that returns the dev_t for "/dev/null".
-rw-r--r-- | sys/arch/alpha/alpha/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/arc/arc/conf.c | 10 | ||||
-rw-r--r-- | sys/arch/arm32/arm32/conf.c | 6 | ||||
-rw-r--r-- | sys/arch/atari/atari/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/i386/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/kbus/kbus/conf.c | 6 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/pc532/pc532/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/pmax/pmax/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/sun3/sun3/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/vax/vax/conf.c | 7 | ||||
-rw-r--r-- | sys/arch/wgrisc/wgrisc/conf.c | 10 | ||||
-rw-r--r-- | sys/sys/conf.h | 3 |
20 files changed, 134 insertions, 20 deletions
diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c index b32c7952b95..d876de99002 100644 --- a/sys/arch/alpha/alpha/conf.c +++ b/sys/arch/alpha/alpha/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.21 2000/07/03 19:30:13 mickey Exp $ */ +/* $OpenBSD: conf.c,v 1.22 2000/09/26 14:03:51 art Exp $ */ /* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */ /*- @@ -217,6 +217,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/amiga/amiga/conf.c b/sys/arch/amiga/amiga/conf.c index fc6ee3feb29..60c187c23ec 100644 --- a/sys/arch/amiga/amiga/conf.c +++ b/sys/arch/amiga/amiga/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.27 2000/09/02 13:45:38 espie Exp $ */ +/* $OpenBSD: conf.c,v 1.28 2000/09/26 14:03:51 art Exp $ */ /* $NetBSD: conf.c,v 1.42 1997/01/07 11:35:03 mrg Exp $ */ /*- @@ -234,6 +234,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktab[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/arc/arc/conf.c b/sys/arch/arc/arc/conf.c index c0b5e64c531..41228683234 100644 --- a/sys/arch/arc/arc/conf.c +++ b/sys/arch/arc/arc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.27 1999/08/12 13:06:33 niklas Exp $ */ +/* $OpenBSD: conf.c,v 1.28 2000/09/26 14:03:51 art Exp $ */ /* * Copyright (c) 1992, 1993 @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)conf.c 8.2 (Berkeley) 11/14/93 - * $Id: conf.c,v 1.27 1999/08/12 13:06:33 niklas Exp $ + * $Id: conf.c,v 1.28 2000/09/26 14:03:51 art Exp $ */ #include <sys/param.h> @@ -281,6 +281,12 @@ iszerodev(dev) #endif } +dev_t +getnulldev() +{ + return makedev(3, 2); +} + static int chrtoblktbl[] = { /* VCHR */ /* VBLK */ diff --git a/sys/arch/arm32/arm32/conf.c b/sys/arch/arm32/arm32/conf.c index a6ad96a5f28..19fc646cc36 100644 --- a/sys/arch/arm32/arm32/conf.c +++ b/sys/arch/arm32/arm32/conf.c @@ -339,6 +339,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 3); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ diff --git a/sys/arch/atari/atari/conf.c b/sys/arch/atari/atari/conf.c index cc79fd2f51f..74bb39025e3 100644 --- a/sys/arch/atari/atari/conf.c +++ b/sys/arch/atari/atari/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.14 2000/03/22 08:34:17 niklas Exp $ */ +/* $OpenBSD: conf.c,v 1.15 2000/09/26 14:03:52 art Exp $ */ /* * Copyright (c) 1991 The Regents of the University of California. @@ -256,6 +256,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktab[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/hp300/hp300/conf.c b/sys/arch/hp300/hp300/conf.c index 0388c45f344..badf7b4a31b 100644 --- a/sys/arch/hp300/hp300/conf.c +++ b/sys/arch/hp300/hp300/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.22 1998/09/25 09:20:53 todd Exp $ */ +/* $OpenBSD: conf.c,v 1.23 2000/09/26 14:03:52 art Exp $ */ /* $NetBSD: conf.c,v 1.39 1997/05/12 08:17:53 thorpej Exp $ */ /*- @@ -254,6 +254,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/hppa/hppa/conf.c b/sys/arch/hppa/hppa/conf.c index c086367d00d..8726fee7701 100644 --- a/sys/arch/hppa/hppa/conf.c +++ b/sys/arch/hppa/hppa/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.7 2000/01/17 06:59:34 mickey Exp $ */ +/* $OpenBSD: conf.c,v 1.8 2000/09/26 14:03:52 art Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -268,6 +268,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + /* * Returns true if dev is /dev/mem or /dev/kmem. */ diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c index 6e6c3757f3a..2e36d246dab 100644 --- a/sys/arch/i386/i386/conf.c +++ b/sys/arch/i386/i386/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.61 2000/07/06 21:51:57 fgsch Exp $ */ +/* $OpenBSD: conf.c,v 1.62 2000/09/26 14:03:53 art Exp $ */ /* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */ /* @@ -347,6 +347,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/kbus/kbus/conf.c b/sys/arch/kbus/kbus/conf.c index 859b9a41e8d..7404e9c5fea 100644 --- a/sys/arch/kbus/kbus/conf.c +++ b/sys/arch/kbus/kbus/conf.c @@ -283,6 +283,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c index 96722000fcd..b644f5ab9d6 100644 --- a/sys/arch/mac68k/mac68k/conf.c +++ b/sys/arch/mac68k/mac68k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.21 1999/05/01 06:28:20 downsj Exp $ */ +/* $OpenBSD: conf.c,v 1.22 2000/09/26 14:03:53 art Exp $ */ /* $NetBSD: conf.c,v 1.41 1997/02/11 07:35:49 scottr Exp $ */ /* @@ -221,6 +221,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktab[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/mvme68k/mvme68k/conf.c b/sys/arch/mvme68k/mvme68k/conf.c index e09c1aa239e..f9f1acb364e 100644 --- a/sys/arch/mvme68k/mvme68k/conf.c +++ b/sys/arch/mvme68k/mvme68k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.19 1998/09/25 09:20:53 todd Exp $ */ +/* $OpenBSD: conf.c,v 1.20 2000/09/26 14:03:53 art Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -278,6 +278,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/mvme88k/mvme88k/conf.c b/sys/arch/mvme88k/mvme88k/conf.c index d39f986279d..e3cd1ae12d7 100644 --- a/sys/arch/mvme88k/mvme88k/conf.c +++ b/sys/arch/mvme88k/mvme88k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.12 1999/09/27 19:13:21 smurph Exp $ */ +/* $OpenBSD: conf.c,v 1.13 2000/09/26 14:03:54 art Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -308,6 +308,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/pc532/pc532/conf.c b/sys/arch/pc532/pc532/conf.c index 2103fe88164..8b089b4bfc9 100644 --- a/sys/arch/pc532/pc532/conf.c +++ b/sys/arch/pc532/pc532/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.12 2000/03/22 08:34:16 niklas Exp $ */ +/* $OpenBSD: conf.c,v 1.13 2000/09/26 14:03:54 art Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -194,6 +194,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/pmax/pmax/conf.c b/sys/arch/pmax/pmax/conf.c index cbf64d13f3b..b6fe966b993 100644 --- a/sys/arch/pmax/pmax/conf.c +++ b/sys/arch/pmax/pmax/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.18 2000/08/19 18:43:30 maja Exp $ */ +/* $OpenBSD: conf.c,v 1.19 2000/09/26 14:03:54 art Exp $ */ /* $NetBSD: conf.c,v 1.23 1996/09/07 12:40:38 mycroft Exp $ */ /* @@ -300,6 +300,12 @@ iszerodev(dev) #endif } +dev_t +getnulldev() +{ + return makedev(3, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/powerpc/powerpc/conf.c b/sys/arch/powerpc/powerpc/conf.c index ddb3a00f22d..5c14eb19fe7 100644 --- a/sys/arch/powerpc/powerpc/conf.c +++ b/sys/arch/powerpc/powerpc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.16 2000/09/06 02:45:11 rahnds Exp $ */ +/* $OpenBSD: conf.c,v 1.17 2000/09/26 14:03:54 art Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -292,6 +292,12 @@ iszerodev(dev) return major(dev) == mem_no && minor(dev) == 12; } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /*VCHR*/ /*VBLK*/ /* 0 */ NODEV, diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c index 32e6efbb8f2..94abe75b0d0 100644 --- a/sys/arch/sparc/sparc/conf.c +++ b/sys/arch/sparc/sparc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.25 2000/06/28 20:22:15 mjacob Exp $ */ +/* $OpenBSD: conf.c,v 1.26 2000/09/26 14:03:55 art Exp $ */ /* $NetBSD: conf.c,v 1.40 1996/04/11 19:20:03 thorpej Exp $ */ /* @@ -299,6 +299,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/sun3/sun3/conf.c b/sys/arch/sun3/sun3/conf.c index 5711d8521f5..032f654fff1 100644 --- a/sys/arch/sun3/sun3/conf.c +++ b/sys/arch/sun3/sun3/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.26 2000/08/28 22:04:53 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.27 2000/09/26 14:03:55 art Exp $ */ /* $NetBSD: conf.c,v 1.51 1996/11/04 16:16:09 gwr Exp $ */ /*- @@ -240,6 +240,12 @@ iszerodev(dev) return (major(dev) == mem_no && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(mem_no, 2); +} + static int chrtoblktbl[] = { /* XXXX This needs to be dynamic for LKMs. */ /*VCHR*/ /*VBLK*/ diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c index 0f26b64d4cb..e67b655ef12 100644 --- a/sys/arch/vax/vax/conf.c +++ b/sys/arch/vax/vax/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.19 2000/06/01 00:02:11 bjc Exp $ */ +/* $OpenBSD: conf.c,v 1.20 2000/09/26 14:03:55 art Exp $ */ /* $NetBSD: conf.c,v 1.44 1999/10/27 16:38:54 ragge Exp $ */ /*- @@ -665,3 +665,8 @@ iszerodev(dev) return (major(dev) == 3 && minor(dev) == 12); } +dev_t +getnulldev() +{ + return makedev(3, 2); +} diff --git a/sys/arch/wgrisc/wgrisc/conf.c b/sys/arch/wgrisc/wgrisc/conf.c index 60ab6a1004d..efcdc5d55d5 100644 --- a/sys/arch/wgrisc/wgrisc/conf.c +++ b/sys/arch/wgrisc/wgrisc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.7 1998/09/25 09:20:55 todd Exp $ */ +/* $OpenBSD: conf.c,v 1.8 2000/09/26 14:03:55 art Exp $ */ /* * Copyright (c) 1992, 1993 @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)conf.c 8.2 (Berkeley) 11/14/93 - * $Id: conf.c,v 1.7 1998/09/25 09:20:55 todd Exp $ + * $Id: conf.c,v 1.8 2000/09/26 14:03:55 art Exp $ */ #include <sys/param.h> @@ -248,6 +248,12 @@ iszerodev(dev) #endif } +dev_t +getnulldev() +{ + return makedev(3, 2); +} + static int chrtoblktbl[] = { /* VCHR */ /* VBLK */ diff --git a/sys/sys/conf.h b/sys/sys/conf.h index ecd3d369c30..ec0c4e76edb 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.37 2000/07/03 19:22:37 mickey Exp $ */ +/* $OpenBSD: conf.h,v 1.38 2000/09/26 14:03:51 art Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -438,6 +438,7 @@ int chrtoblk __P((dev_t)); int blktochr __P((dev_t)); int iskmemdev __P((dev_t)); int iszerodev __P((dev_t)); +dev_t getnulldev __P((void)); cdev_decl(filedesc); |