From mboxrd@z Thu Jan 1 00:00:00 1970 From: WANG Cong Subject: [Patch] utmpname(3) returns int instead of void Date: Sat, 28 Jun 2008 19:17:13 +0100 Message-ID: <20080628181713.GA1605@hack.netcabo.pt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline Sender: linux-man-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Halesh S Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-man@vger.kernel.org As pointed by Halesh S, utmpname(3) should return int, just like what it is in glibc's source code. Signed-off-by: WANG Cong Cc: Halesh S --- Index: man-pages-3.01/man3/getutent.3 =================================================================== --- man-pages-3.01.orig/man3/getutent.3 +++ man-pages-3.01/man3/getutent.3 @@ -44,7 +44,7 @@ getutent, getutid, getutline, pututline, .br .B void endutent(void); .sp -.BI "void utmpname(const char *" file ); +.BI "int utmpname(const char *" file ); .SH DESCRIPTION .BR utmpname () sets the name of the utmp-format file for the other utmp @@ -116,6 +116,10 @@ and return a pointer to a \fIstruct utmp\fP on success, and NULL on failure. This \fIstruct utmp\fP is allocated in static storage, and may be overwritten by subsequent calls. +.br +.BR utmpname() +returns a value of 0 if the new name was successfully stored, and a +value of -1 to indicate an error. .SH FILES /var/run/utmp database of currently logged-in users .br -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html