diff options
author | trhodes <trhodes@FreeBSD.org> | 2006-04-21 07:17:25 +0000 |
---|---|---|
committer | trhodes <trhodes@FreeBSD.org> | 2006-04-21 07:17:25 +0000 |
commit | 2b289f67a8c5b79f1371c4b559709a2362fdfa57 (patch) | |
tree | 3315b0d1ddbd5569909783981228d0959540ec33 | |
parent | cf75387e3b115630104335cd25f28d4cc7e2ce3e (diff) | |
download | FreeBSD-src-2b289f67a8c5b79f1371c4b559709a2362fdfa57.zip FreeBSD-src-2b289f67a8c5b79f1371c4b559709a2362fdfa57.tar.gz |
It seems that POSIX would rather ENODEV returned in place of EINVAL when
trying to mmap() an fd that isn't a normal file.
Reference: http://www.opengroup.org/onlinepubs/009695399/functions/mmap.html
Submitted by: fanf
-rw-r--r-- | sys/vm/vm_mmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 33f387e..5965d4a 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -305,7 +305,7 @@ mmap(td, uap) if ((error = fget(td, uap->fd, &fp)) != 0) goto done; if (fp->f_type != DTYPE_VNODE) { - error = EINVAL; + error = ENODEV; goto done; } /* |