* [Patch] utmpname(3) returns int instead of void
@ 2008-06-28 18:17 WANG Cong
[not found] ` <20080628181713.GA1605-E5McWMdeTmA/VrvnIVm4NQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: WANG Cong @ 2008-06-28 18:17 UTC (permalink / raw)
To: Halesh S
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA
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 <wangcong-va7F5g4oNmbYtjvyW6yDsg@public.gmane.org>
Cc: Halesh S <halesh.s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <20080628181713.GA1605-E5McWMdeTmA/VrvnIVm4NQ@public.gmane.org>]
* Re: [Patch] utmpname(3) returns int instead of void [not found] ` <20080628181713.GA1605-E5McWMdeTmA/VrvnIVm4NQ@public.gmane.org> @ 2008-06-29 2:53 ` Michael Kerrisk 0 siblings, 0 replies; 2+ messages in thread From: Michael Kerrisk @ 2008-06-29 2:53 UTC (permalink / raw) To: WANG Cong Cc: Halesh S, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA On Sat, Jun 28, 2008 at 8:17 PM, WANG Cong <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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 <wangcong-va7F5g4oNmbYtjvyW6yDsg@public.gmane.org> > Cc: Halesh S <halesh.s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Thnks! Applied for man-pages-3.02. Cheers, Michael > 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 > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html -- 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-29 2:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-28 18:17 [Patch] utmpname(3) returns int instead of void WANG Cong
[not found] ` <20080628181713.GA1605-E5McWMdeTmA/VrvnIVm4NQ@public.gmane.org>
2008-06-29 2:53 ` Michael Kerrisk
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.