public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] hurd: Also turn KERN_INVALID_ADDRESS to EINVAL
@ 2020-12-19 17:58 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-12-19 17:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b74233d0092c9ee6a2faee5adb375b3151bdc99c

commit b74233d0092c9ee6a2faee5adb375b3151bdc99c
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Dec 19 18:57:47 2020 +0100

    hurd: Also turn KERN_INVALID_ADDRESS to EINVAL
    
    When e.g. mmap is passed an invalid address we would return
    KERN_INVALID_ADDRESS, while POSIX applications would expect EINVAL.

Diff:
---
 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-19 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19 17:58 [glibc] hurd: Also turn KERN_INVALID_ADDRESS to EINVAL Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).