* [PATCH] syslog: document new return values
@ 2008-02-13 0:37 Jeremy Kerr
2008-02-14 18:54 ` Michael Kerrisk
0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Kerr @ 2008-02-13 0:37 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
.. also, add entries for type==9 and type==10 to the RETURN VALUES
section.
Signed-off-by: Jeremy Kerr <jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
---
man2/syslog.2 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: man-pages-2.77/man2/syslog.2
===================================================================
--- man-pages-2.77.orig/man2/syslog.2
+++ man-pages-2.77/man2/syslog.2
@@ -195,7 +195,12 @@ Otherwise,
for \fItype\fP equal to 2, 3 or 4,
.BR syslog ()
returns the number
-of bytes read, and otherwise 0.
+of bytes read,
+for \fItype\fP equal to 9,
+the number of number of unread characters in the log buffer,
+for \fItype\fP equal to 10,
+the total size of the log buffer,
+and otherwise 0.
.SH ERRORS
.TP
.B EINVAL
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] syslog: document new return values
2008-02-13 0:37 [PATCH] syslog: document new return values Jeremy Kerr
@ 2008-02-14 18:54 ` Michael Kerrisk
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk @ 2008-02-14 18:54 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA
Jeremy Kerr wrote:
> .. also, add entries for type==9 and type==10 to the RETURN VALUES
> section.
>
> Signed-off-by: Jeremy Kerr <jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
>
> ---
>
> man2/syslog.2 | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> Index: man-pages-2.77/man2/syslog.2
> ===================================================================
> --- man-pages-2.77.orig/man2/syslog.2
> +++ man-pages-2.77/man2/syslog.2
> @@ -195,7 +195,12 @@ Otherwise,
> for \fItype\fP equal to 2, 3 or 4,
> .BR syslog ()
> returns the number
> -of bytes read, and otherwise 0.
> +of bytes read,
> +for \fItype\fP equal to 9,
> +the number of number of unread characters in the log buffer,
> +for \fItype\fP equal to 10,
> +the total size of the log buffer,
> +and otherwise 0.
> .SH ERRORS
> .TP
> .B EINVAL
Hi Jeremy,
Thanks. I applied something like this (did a little reworking of that
section) for man-pages-2.79.
Cheers,
Michael
.SH "RETURN VALUE"
-In case of error, \-1 is returned, and \fIerrno\fP is set.
-Otherwise,
-for \fItype\fP equal to 2, 3 or 4,
+For \fItype\fP equal to 2, 3, or 4, a successful call to
.BR syslog ()
returns the number
-of bytes read, and otherwise 0.
+of bytes read.
+For \fItype\fP 9,
+.BR syslog ()
+returns the number of bytes currently
+available to be read on the kernel log buffer.
+For \fItype\fP 10,
+.BR syslog ()
+returns the total size of the kernel log buffer.
+For other values of \fItype\fP, 0 is returned on success.
+
+In case of error, \-1 is returned,
+and \fIerrno\fP is set to indicate the error.
--
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug? Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-14 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 0:37 [PATCH] syslog: document new return values Jeremy Kerr
2008-02-14 18:54 ` Michael Kerrisk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox