diff options
author | bde <bde@FreeBSD.org> | 1995-10-29 11:37:56 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-10-29 11:37:56 +0000 |
commit | 3ca7c7d5ded8ac04989835f91ff17191a7737ca9 (patch) | |
tree | 5b0fcae9ac63041789397dff85fb510a4bb1e6c6 /sys | |
parent | 9bf544b7f3146ba8f4682ade5187b9164c952e74 (diff) | |
download | FreeBSD-src-3ca7c7d5ded8ac04989835f91ff17191a7737ca9.zip FreeBSD-src-3ca7c7d5ded8ac04989835f91ff17191a7737ca9.tar.gz |
Fix mmioctl() for !DEVRANDOM case. mmioctl() is a function, not a
pointer to a function.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/mem.c | 22 | ||||
-rw-r--r-- | 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 e2ddf1b..47e927b 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 <sys/proc.h> #include <machine/cpu.h> +#include <machine/random.h> #include <machine/psl.h> #include <vm/vm.h> @@ -62,8 +63,6 @@ #include <vm/vm_prot.h> #include <vm/pmap.h> -#include <machine/random.h> - #ifdef DEVFS #include <sys/devfsext.h> #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 e2ddf1b..47e927b 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 <sys/proc.h> #include <machine/cpu.h> +#include <machine/random.h> #include <machine/psl.h> #include <vm/vm.h> @@ -62,8 +63,6 @@ #include <vm/vm_prot.h> #include <vm/pmap.h> -#include <machine/random.h> - #ifdef DEVFS #include <sys/devfsext.h> #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 */ +} |