Correct wrong error return in mmap fn.
This commit is contained in:
parent
3062ec75d6
commit
7e6f124451
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bktr_core.c,v 1.16 2001/03/01 22:53:13 mjl Exp $ */
|
/* $NetBSD: bktr_core.c,v 1.17 2001/03/03 00:08:05 mjl Exp $ */
|
||||||
|
|
||||||
/* FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp */
|
/* FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bktr_os.c,v 1.17 2000/12/30 17:02:53 wiz Exp $ */
|
/* $NetBSD: bktr_os.c,v 1.18 2001/03/03 00:08:06 mjl Exp $ */
|
||||||
|
|
||||||
/* FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp */
|
/* FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp */
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ bktr_mmap( dev_t dev, vm_offset_t offset, int nprot )
|
||||||
bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit);
|
bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit);
|
||||||
if (bktr == NULL) {
|
if (bktr == NULL) {
|
||||||
/* the device is no longer valid/functioning */
|
/* the device is no longer valid/functioning */
|
||||||
return (ENXIO);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nprot & PROT_EXEC)
|
if (nprot & PROT_EXEC)
|
||||||
|
|
Loading…
Reference in New Issue