[hurd,commited] hurd: Also turn KERN_INVALID_ADDRESS to EINVAL

Samuel Thibault samuel.thibault@ens-lyon.org
Sat Dec 19 17:58:50 GMT 2020


When e.g. mmap is passed an invalid address we would return
KERN_INVALID_ADDRESS, while POSIX applications would expect EINVAL.
---
 hurd/hurd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hurd/hurd.h b/hurd/hurd.h
index c6e88a63c2..5fa7be5add 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -66,6 +66,7 @@ __hurd_fail (error_t err)
       err = (error_t) ENOMEM;
       break;
 
+    case KERN_INVALID_ADDRESS:
     case KERN_INVALID_ARGUMENT:
       err = (error_t) EINVAL;
       break;
-- 
2.29.2



More information about the Libc-alpha mailing list