Date: Tue, 18 Jul 2017 08:28:37 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321116 - stable/11/share/man/man9 Message-ID: <201707180828.v6I8SbBP032391@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Tue Jul 18 08:28:37 2017 New Revision: 321116 URL: https://svnweb.freebsd.org/changeset/base/321116 Log: MFC r316549,r316550,r316551,r316554: r316549: Add sys/types.h #include to EXAMPLE to provide a complete functional standalone example program r316550: sbuf(9): convert SYNOPSIS section from .Fn entries to .Fo/.Fa/.Fc entries This shortens the column count on many lines considerably. While here, add "(void)" to sbuf_new_auto(3) for consistency with style(9) recommendations. r316551: sbuf(9): clarify kernel-only APIs - move sbuf_bcopyin(9) and sbuf_copyin(9) near sbuf_new_for_sysctl(9), as all three functions are kernel-only APIs. - add #ifdef _KERNEL around sbuf_*copyin and sbuf_new_for_sysctl(9) to make it visually clear that they are kernel-only APIs. r316554: sbuf(9): add MLINKS for sbuf_{clear,get,set}_flags(9) These functions were added in r279992. Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/sbuf.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Tue Jul 18 08:28:14 2017 (r321115) +++ stable/11/share/man/man9/Makefile Tue Jul 18 08:28:37 2017 (r321116) @@ -1461,6 +1461,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \ sbuf.9 sbuf_bcpy.9 \ sbuf.9 sbuf_cat.9 \ sbuf.9 sbuf_clear.9 \ + sbuf.9 sbuf_clear_flags.9 \ sbuf.9 sbuf_copyin.9 \ sbuf.9 sbuf_cpy.9 \ sbuf.9 sbuf_data.9 \ @@ -1468,6 +1469,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \ sbuf.9 sbuf_done.9 \ sbuf.9 sbuf_error.9 \ sbuf.9 sbuf_finish.9 \ + sbuf.9 sbuf_get_flags.9 \ sbuf.9 sbuf_hexdump.9 \ sbuf.9 sbuf_len.9 \ sbuf.9 sbuf_new.9 \ @@ -1476,6 +1478,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \ sbuf.9 sbuf_printf.9 \ sbuf.9 sbuf_putc.9 \ sbuf.9 sbuf_set_drain.9 \ + sbuf.9 sbuf_set_flags.9 \ sbuf.9 sbuf_setpos.9 \ sbuf.9 sbuf_start_section.9 \ sbuf.9 sbuf_end_section.9 \ Modified: stable/11/share/man/man9/sbuf.9 ============================================================================== --- stable/11/share/man/man9/sbuf.9 Tue Jul 18 08:28:14 2017 (r321115) +++ stable/11/share/man/man9/sbuf.9 Tue Jul 18 08:28:37 2017 (r321116) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 14, 2015 +.Dd April 5, 2017 .Dt SBUF 9 .Os .Sh NAME @@ -66,57 +66,123 @@ .Ft typedef\ int ( sbuf_drain_func ) ( void\ *arg, const\ char\ *data, int\ len ) ; .Pp .Ft struct sbuf * -.Fn sbuf_new "struct sbuf *s" "char *buf" "int length" "int flags" +.Fo sbuf_new +.Fa "struct sbuf *s" +.Fa "char *buf" +.Fa "int length" +.Fa "int flags" +.Fc .Ft struct sbuf * -.Fn sbuf_new_auto +.Fo sbuf_new_auto +.Fa "void" +.Fc .Ft void -.Fn sbuf_clear "struct sbuf *s" +.Fo sbuf_clear +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_get_flags "struct sbuf *s" +.Fo sbuf_get_flags +.Fa "struct sbuf *s" +.Fc .Ft void -.Fn sbuf_set_flags "struct sbuf *s" "int flags" +.Fo sbuf_set_flags +.Fa "struct sbuf *s" +.Fa "int flags" +.Fc .Ft void -.Fn sbuf_clear_flags "struct sbuf *s" "int flags" +.Fo sbuf_clear_flags +.Fa "struct sbuf *s" +.Fa "int flags" +.Fc .Ft int -.Fn sbuf_setpos "struct sbuf *s" "int pos" +.Fo sbuf_setpos +.Fa "struct sbuf *s" +.Fa "int pos" +.Fc .Ft int -.Fn sbuf_bcat "struct sbuf *s" "const void *buf" "size_t len" +.Fo sbuf_bcat +.Fa "struct sbuf *s" +.Fa "const void *buf" +.Fa "size_t len" +.Fc .Ft int -.Fn sbuf_bcopyin "struct sbuf *s" "const void *uaddr" "size_t len" +.Fo sbuf_bcpy +.Fa "struct sbuf *s" +.Fa "const void *buf" +.Fa "size_t len" +.Fc .Ft int -.Fn sbuf_bcpy "struct sbuf *s" "const void *buf" "size_t len" +.Fo sbuf_cat +.Fa "struct sbuf *s" +.Fa "const char *str" +.Fc .Ft int -.Fn sbuf_cat "struct sbuf *s" "const char *str" +.Fo sbuf_cpy +.Fa "struct sbuf *s" +.Fa "const char *str" +.Fc .Ft int -.Fn sbuf_copyin "struct sbuf *s" "const void *uaddr" "size_t len" +.Fo sbuf_printf +.Fa "struct sbuf *s" +.Fa "const char *fmt" "..." +.Fc .Ft int -.Fn sbuf_cpy "struct sbuf *s" "const char *str" +.Fo sbuf_vprintf +.Fa "struct sbuf *s" +.Fa "const char *fmt" +.Fa "va_list ap" +.Fc .Ft int -.Fn sbuf_printf "struct sbuf *s" "const char *fmt" "..." -.Ft int -.Fn sbuf_vprintf "struct sbuf *s" "const char *fmt" "va_list ap" -.Ft int -.Fn sbuf_putc "struct sbuf *s" "int c" +.Fo sbuf_putc +.Fa "struct sbuf *s" +.Fa "int c" +.Fc .Ft void -.Fn sbuf_set_drain "struct sbuf *s" "sbuf_drain_func *func" "void *arg" +.Fo sbuf_set_drain +.Fa "struct sbuf *s" +.Fa "sbuf_drain_func *func" +.Fa "void *arg" +.Fc .Ft int -.Fn sbuf_trim "struct sbuf *s" +.Fo sbuf_trim +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_error "struct sbuf *s" +.Fo sbuf_error +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_finish "struct sbuf *s" +.Fo sbuf_finish +.Fa "struct sbuf *s" +.Fc .Ft char * -.Fn sbuf_data "struct sbuf *s" +.Fo sbuf_data +.Fa "struct sbuf *s" +.Fc .Ft ssize_t -.Fn sbuf_len "struct sbuf *s" +.Fo sbuf_len +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_done "struct sbuf *s" +.Fo sbuf_done +.Fa "struct sbuf *s" +.Fc .Ft void -.Fn sbuf_delete "struct sbuf *s" +.Fo sbuf_delete +.Fa "struct sbuf *s" +.Fc .Ft void -.Fn sbuf_start_section "struct sbuf *s" "ssize_t *old_lenp" +.Fo sbuf_start_section +.Fa "struct sbuf *s" +.Fa "ssize_t *old_lenp" +.Fc .Ft ssize_t -.Fn sbuf_end_section "struct sbuf *s" "ssize_t old_len" "size_t pad" "int c" +.Fo sbuf_end_section +.Fa "struct sbuf *s" +.Fa "ssize_t old_len" +.Fa "size_t pad" +.Fa "int c" +.Fc .Ft void .Fo sbuf_hexdump .Fa "struct sbuf *sb" @@ -126,10 +192,33 @@ .Fa "int flags" .Fc .Ft void -.Fn sbuf_putbuf "struct sbuf *s" +.Fo sbuf_putbuf +.Fa "struct sbuf *s" +.Fc +.Fd #ifdef _KERNEL +.In sys/types.h +.In sys/sbuf.h +.Ft int +.Fo sbuf_bcopyin +.Fa "struct sbuf *s" +.Fa "const void *uaddr" +.Fa "size_t len" +.Fc +.Ft int +.Fo sbuf_copyin +.Fa "struct sbuf *s" +.Fa "const void *uaddr" +.Fa "size_t len" +.Fc .In sys/sysctl.h .Ft struct sbuf * -.Fn sbuf_new_for_sysctl "struct sbuf *s" "char *buf" "int length" "struct sysctl_req *req" +.Fo sbuf_new_for_sysctl +.Fa "struct sbuf *s" +.Fa "char *buf" +.Fa "int length" +.Fa "struct sysctl_req *req" +.Fc +.Fd #endif /* _KERNEL */ .Sh DESCRIPTION The .Nm @@ -567,6 +656,7 @@ function (the userland version) will return zero for success and \-1 and set errno on error. .Sh EXAMPLES .Bd -literal -compact +#include <sys/types.h> #include <sys/sbuf.h> struct sbuf *sb;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707180828.v6I8SbBP032391>