From 00f7f6be8ac51035a0b8e4f65f02cb71091429d4 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 29 Oct 1995 11:37:56 +0000 Subject: [PATCH] Fix mmioctl() for !DEVRANDOM case. mmioctl() is a function, not a pointer to a function. --- sys/amd64/amd64/mem.c | 22 ++++++++++++---------- sys/i386/i386/mem.c | 22 ++++++++++++---------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index e2ddf1b3bea6..47e927bfc119 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.14 1995/09/20 13:01:17 davidg Exp $ + * $Id: mem.c,v 1.15 1995/10/28 16:57:55 markm Exp $ */ /* @@ -54,6 +54,7 @@ #include #include +#include #include #include @@ -62,8 +63,6 @@ #include #include -#include - #ifdef DEVFS #include #include "sys/kernel.h" @@ -339,16 +338,19 @@ int memmmap(dev_t dev, int offset, int nprot) } } -#ifdef DEVRANDOM - /* * Allow userland to select which interrupts will be used in the muck * gathering business. */ - int -mmioctl(dev_t dev, int cmd, caddr_t cmdarg, int flags, struct proc *p) +mmioctl(dev, cmd, cmdarg, flags, p) + dev_t dev; + int cmd; + caddr_t cmdarg; + int flags; + struct proc *p; { +#ifdef DEVRANDOM if (minor(dev) != 3 && minor(dev) != 4) return (ENODEV); @@ -373,7 +375,7 @@ mmioctl(dev_t dev, int cmd, caddr_t cmdarg, int flags, struct proc *p) return (ENOTTY); } return (0); -} #else -d_ioctl_t *mmioctl = enodev; -#endif + return (ENODEV); +#endif /* DEVRANDOM */ +} diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index e2ddf1b3bea6..47e927bfc119 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.14 1995/09/20 13:01:17 davidg Exp $ + * $Id: mem.c,v 1.15 1995/10/28 16:57:55 markm Exp $ */ /* @@ -54,6 +54,7 @@ #include #include +#include #include #include @@ -62,8 +63,6 @@ #include #include -#include - #ifdef DEVFS #include #include "sys/kernel.h" @@ -339,16 +338,19 @@ int memmmap(dev_t dev, int offset, int nprot) } } -#ifdef DEVRANDOM - /* * Allow userland to select which interrupts will be used in the muck * gathering business. */ - int -mmioctl(dev_t dev, int cmd, caddr_t cmdarg, int flags, struct proc *p) +mmioctl(dev, cmd, cmdarg, flags, p) + dev_t dev; + int cmd; + caddr_t cmdarg; + int flags; + struct proc *p; { +#ifdef DEVRANDOM if (minor(dev) != 3 && minor(dev) != 4) return (ENODEV); @@ -373,7 +375,7 @@ mmioctl(dev_t dev, int cmd, caddr_t cmdarg, int flags, struct proc *p) return (ENOTTY); } return (0); -} #else -d_ioctl_t *mmioctl = enodev; -#endif + return (ENODEV); +#endif /* DEVRANDOM */ +}