Bug 52741 - getnameinfo man page has inappropriate text copied from getaddrinfo
Summary: getnameinfo man page has inappropriate text copied from getaddrinfo
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-15 14:50 UTC by Peter Budny
Modified: 2013-01-15 19:46 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Peter Budny 2013-01-15 14:50:30 UTC
As of release 3.43 on 2012-08-05, the man page for getnameinfo(3) contains the following in its first paragraph:

"It combines the functionality of gethostbyaddr(3) and getservbyport(3),  but  unlike those functions, getaddrinfo(3) is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies."

This text is identical to what's in getaddrinfo(3).  It seems someone copied it but didn't rewrite it to describe the functions that getnameinfo(3) is intended to replace.
Comment 1 Michael Kerrisk 2013-01-15 19:46:01 UTC
Thkanks for the report Peter.

So, it seems here were a confused references in both getnameinfo() and getaddrinfo(). I applied the following patch.

--- a/man3/getaddrinfo.3
+++ b/man3/getaddrinfo.3
@@ -91,7 +91,7 @@ function combines the functionality provided by the
 .\" .BR getipnodebyaddr (3),
 .BR getservbyname (3)
 and
-.BR getservbyport (3)
+.BR getservbyname (3)
 functions into a single interface, but unlike the latter functions,
 .BR getaddrinfo ()
 is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies.
diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3
index f1001cd..5bafd76 100644
--- a/man3/getnameinfo.3
+++ b/man3/getnameinfo.3
@@ -38,7 +38,7 @@ It combines the functionality of
 and
 .BR getservbyport (3),
 but unlike those functions,
-.BR getaddrinfo (3)
+.BR getnameinfo (3)
 is reentrant and allows programs to eliminate
 IPv4-versus-IPv6 dependencies.
 
@@ -111,7 +111,7 @@ cannot be determined.)
 If set, then the numeric form of the service address is returned.
 (When not set, this will still happen in case the service's name
 cannot be determined.)
-.SS "Extensions to getaddrinfo() for Internationalized Domain Names"
+.SS "Extensions to getnameinfo() for Internationalized Domain Names"
 .PP
 Starting with glibc 2.3.4,
 .BR getnameinfo ()

Note You need to log in before you can comment on or make changes to this bug.