Messages in this thread Patch in this message |  | | From | Herbert Xu <> | Date | Sat, 26 Aug 2000 15:17:04 +1000 | Subject | [PATCH] socket(2) should return EAFNOSUPPORT if no family found |
| |
Here is a trivial patch to make socket(2) return -EAFNOSUPPORT instead of -EINVAL if the family can't found. SuS specifies EAFNOSUPPORT for socket(2) in this situation. -- Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --- linux/net/socket.c.orig Sat Aug 26 15:08:29 2000 +++ linux/net/socket.c Sat Aug 26 15:09:36 2000 @@ -855,7 +855,7 @@ net_family_read_lock(); if (net_families[family] == NULL) { - i = -EINVAL; + i = -EAFNOSUPPORT; goto out; } |  |