FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/ctype.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/uio.h>
#include <machine/stdarg.h>
#include <sys/sbuf.h>
Go to the source code of this file.
Macros | |
#define | SBMALLOC(size, flags) malloc(size, M_SBUF, (flags) | M_ZERO) |
#define | SBFREE(buf) free(buf, M_SBUF) |
#define | SBUF_ISDYNAMIC(s) ((s)->s_flags & SBUF_DYNAMIC) |
#define | SBUF_ISDYNSTRUCT(s) ((s)->s_flags & SBUF_DYNSTRUCT) |
#define | SBUF_ISFINISHED(s) ((s)->s_flags & SBUF_FINISHED) |
#define | SBUF_ISDRAINATEOL(s) ((s)->s_flags & SBUF_DRAINATEOL) |
#define | SBUF_HASROOM(s) ((s)->s_len < (s)->s_size - 1) |
#define | SBUF_FREESPACE(s) ((s)->s_size - ((s)->s_len + 1)) |
#define | SBUF_CANEXTEND(s) ((s)->s_flags & SBUF_AUTOEXTEND) |
#define | SBUF_ISSECTION(s) ((s)->s_flags & SBUF_INSECTION) |
#define | SBUF_NULINCLUDED(s) ((s)->s_flags & SBUF_INCLUDENUL) |
#define | SBUF_ISDRAINTOEOR(s) ((s)->s_flags & SBUF_DRAINTOEOR) |
#define | SBUF_DODRAINTOEOR(s) (SBUF_ISSECTION(s) && SBUF_ISDRAINTOEOR(s)) |
#define | SBUF_MALLOCFLAG(s) (((s)->s_flags & SBUF_NOWAIT) ? M_NOWAIT : M_WAITOK) |
#define | SBUF_SETFLAG(s, f) do { (s)->s_flags |= (f); } while (0) |
#define | SBUF_CLEARFLAG(s, f) do { (s)->s_flags &= ~(f); } while (0) |
#define | SBUF_MINSIZE 2 /* Min is 1 byte + nulterm. */ |
#define | SBUF_MINEXTENDSIZE 16 /* Should be power of 2. */ |
#define | SBUF_MAXEXTENDSIZE 4096 |
#define | SBUF_MAXEXTENDINCR 4096 |
#define | assert_sbuf_integrity(s) do { } while (0) |
#define | assert_sbuf_state(s, i) do { } while (0) |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_SBUF, "sbuf", "string buffers") |
static int | sbuf_extendsize (int size) |
static int | sbuf_extend (struct sbuf *s, int addlen) |
struct sbuf * | sbuf_new (struct sbuf *s, char *buf, int length, int flags) |
struct sbuf * | sbuf_uionew (struct sbuf *s, struct uio *uio, int *error) |
int | sbuf_get_flags (struct sbuf *s) |
void | sbuf_clear_flags (struct sbuf *s, int flags) |
void | sbuf_set_flags (struct sbuf *s, int flags) |
void | sbuf_clear (struct sbuf *s) |
int | sbuf_setpos (struct sbuf *s, ssize_t pos) |
int | sbuf_count_drain (void *arg, const char *data __unused, int len) |
void | sbuf_set_drain (struct sbuf *s, sbuf_drain_func *func, void *ctx) |
int | sbuf_drain (struct sbuf *s) |
static void | sbuf_put_bytes (struct sbuf *s, const char *buf, size_t len) |
static void | sbuf_put_byte (struct sbuf *s, char c) |
int | sbuf_bcat (struct sbuf *s, const void *buf, size_t len) |
int | sbuf_bcopyin (struct sbuf *s, const void *uaddr, size_t len) |
int | sbuf_bcpy (struct sbuf *s, const void *buf, size_t len) |
int | sbuf_cat (struct sbuf *s, const char *str) |
int | sbuf_copyin (struct sbuf *s, const void *uaddr, size_t len) |
int | sbuf_cpy (struct sbuf *s, const char *str) |
static void | sbuf_putc_func (int c, void *arg) |
int | sbuf_vprintf (struct sbuf *s, const char *fmt, va_list ap) |
int | sbuf_printf (struct sbuf *s, const char *fmt,...) |
int | sbuf_putc (struct sbuf *s, int c) |
int | sbuf_nl_terminate (struct sbuf *s) |
int | sbuf_trim (struct sbuf *s) |
int | sbuf_error (const struct sbuf *s) |
int | sbuf_finish (struct sbuf *s) |
char * | sbuf_data (struct sbuf *s) |
ssize_t | sbuf_len (struct sbuf *s) |
void | sbuf_delete (struct sbuf *s) |
int | sbuf_done (const struct sbuf *s) |
void | sbuf_start_section (struct sbuf *s, ssize_t *old_lenp) |
ssize_t | sbuf_end_section (struct sbuf *s, ssize_t old_len, size_t pad, int c) |
#define assert_sbuf_integrity | ( | s | ) | do { } while (0) |
Definition at line 139 of file subr_sbuf.c.
#define assert_sbuf_state | ( | s, | |
i | |||
) | do { } while (0) |
Definition at line 140 of file subr_sbuf.c.
Definition at line 60 of file subr_sbuf.c.
Definition at line 59 of file subr_sbuf.c.
#define SBUF_CANEXTEND | ( | s | ) | ((s)->s_flags & SBUF_AUTOEXTEND) |
Definition at line 76 of file subr_sbuf.c.
#define SBUF_CLEARFLAG | ( | s, | |
f | |||
) | do { (s)->s_flags &= ~(f); } while (0) |
Definition at line 88 of file subr_sbuf.c.
#define SBUF_DODRAINTOEOR | ( | s | ) | (SBUF_ISSECTION(s) && SBUF_ISDRAINTOEOR(s)) |
Definition at line 80 of file subr_sbuf.c.
#define SBUF_FREESPACE | ( | s | ) | ((s)->s_size - ((s)->s_len + 1)) |
Definition at line 75 of file subr_sbuf.c.
#define SBUF_HASROOM | ( | s | ) | ((s)->s_len < (s)->s_size - 1) |
Definition at line 74 of file subr_sbuf.c.
#define SBUF_ISDRAINATEOL | ( | s | ) | ((s)->s_flags & SBUF_DRAINATEOL) |
Definition at line 73 of file subr_sbuf.c.
#define SBUF_ISDRAINTOEOR | ( | s | ) | ((s)->s_flags & SBUF_DRAINTOEOR) |
Definition at line 79 of file subr_sbuf.c.
#define SBUF_ISDYNAMIC | ( | s | ) | ((s)->s_flags & SBUF_DYNAMIC) |
Definition at line 70 of file subr_sbuf.c.
#define SBUF_ISDYNSTRUCT | ( | s | ) | ((s)->s_flags & SBUF_DYNSTRUCT) |
Definition at line 71 of file subr_sbuf.c.
#define SBUF_ISFINISHED | ( | s | ) | ((s)->s_flags & SBUF_FINISHED) |
Definition at line 72 of file subr_sbuf.c.
#define SBUF_ISSECTION | ( | s | ) | ((s)->s_flags & SBUF_INSECTION) |
Definition at line 77 of file subr_sbuf.c.
#define SBUF_MALLOCFLAG | ( | s | ) | (((s)->s_flags & SBUF_NOWAIT) ? M_NOWAIT : M_WAITOK) |
Definition at line 81 of file subr_sbuf.c.
#define SBUF_MAXEXTENDINCR 4096 |
Definition at line 98 of file subr_sbuf.c.
#define SBUF_MAXEXTENDSIZE 4096 |
Definition at line 97 of file subr_sbuf.c.
#define SBUF_MINEXTENDSIZE 16 /* Should be power of 2. */ |
Definition at line 91 of file subr_sbuf.c.
#define SBUF_MINSIZE 2 /* Min is 1 byte + nulterm. */ |
Definition at line 90 of file subr_sbuf.c.
#define SBUF_NULINCLUDED | ( | s | ) | ((s)->s_flags & SBUF_INCLUDENUL) |
Definition at line 78 of file subr_sbuf.c.
#define SBUF_SETFLAG | ( | s, | |
f | |||
) | do { (s)->s_flags |= (f); } while (0) |
Definition at line 87 of file subr_sbuf.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
int sbuf_bcat | ( | struct sbuf * | s, |
const void * | buf, | ||
size_t | len | ||
) |
Definition at line 509 of file subr_sbuf.c.
References buf, and sbuf_put_bytes().
Referenced by corehdr(), export_kinfo_to_sb(), get_ps_strings(), kern_proc_out(), kern_proc_vmmap_out(), note_procstat_auxv(), note_procstat_files(), note_procstat_groups(), note_procstat_osrel(), note_procstat_proc(), note_procstat_psstrings(), note_procstat_rlimit(), note_procstat_umask(), note_procstat_vmmap(), note_prpsinfo(), note_ptlwpinfo(), note_threadmd(), note_thrmisc(), proc_getauxv(), putnote(), sbuf_bcpy(), sonewconn(), sysctl_debug_tslog(), sysctl_kern_malloc_stats(), and sysctl_posix_shm_list().
int sbuf_bcopyin | ( | struct sbuf * | s, |
const void * | uaddr, | ||
size_t | len | ||
) |
Definition at line 523 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, sbuf_extend(), and SBUF_FREESPACE.
int sbuf_bcpy | ( | struct sbuf * | s, |
const void * | buf, | ||
size_t | len | ||
) |
Definition at line 552 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, buf, sbuf_bcat(), and sbuf_clear().
int sbuf_cat | ( | struct sbuf * | s, |
const char * | str | ||
) |
Definition at line 566 of file subr_sbuf.c.
References sbuf_put_bytes().
Referenced by devaddq(), devctl_notify(), device_log(), device_printf(), device_sysctl_handler(), dumpdevname_sysctl_handler(), kern_abort2(), mount_devctl_event(), preload_dump_internal(), preload_modinfo_type(), preload_modinfo_value(), sbuf_cpy(), sbuf_printf_uuid(), sonewconn(), stats_v1_itercb_tostr_json(), stats_voistatdata_hist_tostr(), stats_voistatdata_tdgst_tostr(), stats_voistatdata_tostr(), and sysctl_devices().
void sbuf_clear | ( | struct sbuf * | s | ) |
Definition at line 316 of file subr_sbuf.c.
References assert_sbuf_integrity, and SBUF_CLEARFLAG.
Referenced by kern_abort2(), sbuf_bcpy(), sbuf_cpy(), sbuf_print_witness_badstacks(), sonewconn(), sysctl_kern_console(), and vfs_mountroot().
void sbuf_clear_flags | ( | struct sbuf * | s, |
int | flags | ||
) |
Definition at line 299 of file subr_sbuf.c.
References flags.
Referenced by device_sysctl_handler(), sysctl_kern_malloc_stats(), sysctl_kern_proc_args(), sysctl_kern_proc_auxv(), sysctl_kern_proc_cwd(), sysctl_kern_proc_env(), sysctl_kern_proc_filedesc(), sysctl_kern_proc_vmmap(), sysctl_out_proc(), and sysctl_posix_shm_list().
int sbuf_copyin | ( | struct sbuf * | s, |
const void * | uaddr, | ||
size_t | len | ||
) |
Definition at line 582 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, sbuf_extend(), SBUF_FREESPACE, and SBUF_ISSECTION.
Referenced by kern_abort2().
int sbuf_count_drain | ( | void * | arg, |
const char *data | __unused, | ||
int | len | ||
) |
Definition at line 362 of file subr_sbuf.c.
Referenced by note_procstat_auxv(), note_procstat_files(), and note_procstat_vmmap().
int sbuf_cpy | ( | struct sbuf * | s, |
const char * | str | ||
) |
Definition at line 622 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, sbuf_cat(), and sbuf_clear().
Referenced by cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), devaddq(), devctl_notify(), and mount_devctl_event().
char * sbuf_data | ( | struct sbuf * | s | ) |
Definition at line 862 of file subr_sbuf.c.
References assert_sbuf_integrity, and assert_sbuf_state.
Referenced by coredump(), cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), device_get_path(), device_log(), exec_shell_imgact(), imgact_binmisc_exec(), kern_abort2(), mount_argf(), mount_devctl_event(), sbuf_putbuf(), sonewconn(), stats_tpl_list_available(), stats_tpl_sample_rates(), sysctl_debug_witness_badstacks(), sysctl_kern_console(), sysctl_kern_eventtimer_choice(), sysctl_log(), sysctl_vfs_root_mount_hold(), and vfs_mountroot_parse().
void sbuf_delete | ( | struct sbuf * | s | ) |
Definition at line 898 of file subr_sbuf.c.
References assert_sbuf_integrity, SBFREE, SBUF_ISDYNAMIC, and SBUF_ISDYNSTRUCT.
Referenced by coredump(), corefile_open(), corehdr(), cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), device_get_path(), device_log(), device_printf(), device_sysctl_handler(), dumpdevname_sysctl_handler(), exec_shell_imgact(), fail_point_sysctl(), fail_point_sysctl_status(), imgact_binmisc_exec(), kdb_sysctl_available(), kern_abort2(), mount_argf(), mount_devctl_event(), note_procstat_auxv(), note_procstat_files(), note_procstat_vmmap(), note_prpsinfo(), preload_dump(), sbuf_uionew(), sonewconn(), stats_tpl_list_available(), sysctl_debug_tslog(), sysctl_debug_tslog_user(), sysctl_debug_witness_badstacks(), sysctl_debug_witness_fullgraph(), sysctl_devices(), sysctl_kern_console(), sysctl_kern_eventtimer_choice(), sysctl_kern_malloc_stats(), sysctl_kern_proc_args(), sysctl_kern_proc_auxv(), sysctl_kern_proc_cwd(), sysctl_kern_proc_env(), sysctl_kern_proc_filedesc(), sysctl_kern_proc_vmmap(), sysctl_kern_timecounter_choice(), sysctl_log(), sysctl_out_proc(), sysctl_posix_shm_list(), sysctl_preload_dump(), sysctl_vfs_root_mount_hold(), tty_info(), vfs_mountroot(), and witness_checkorder().
int sbuf_done | ( | const struct sbuf * | s | ) |
Definition at line 917 of file subr_sbuf.c.
References SBUF_ISFINISHED.
int sbuf_drain | ( | struct sbuf * | s | ) |
Definition at line 391 of file subr_sbuf.c.
References SBUF_CLEARFLAG, SBUF_DODRAINTOEOR, and SBUF_SETFLAG.
Referenced by sbuf_finish(), sbuf_put_byte(), and sbuf_put_bytes().
ssize_t sbuf_end_section | ( | struct sbuf * | s, |
ssize_t | old_len, | ||
size_t | pad, | ||
int | c | ||
) |
Definition at line 953 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, SBUF_CLEARFLAG, SBUF_ISSECTION, and sbuf_put_byte().
Referenced by corehdr(), note_procstat_files(), and putnote().
int sbuf_error | ( | const struct sbuf * | s | ) |
Definition at line 823 of file subr_sbuf.c.
Referenced by corefile_open(), export_kinfo_to_sb(), mount_devctl_event(), stats_v1_blob_tostr(), stats_v1_itercb_tostr(), and stats_voistatdata_tostr().
|
static |
Definition at line 169 of file subr_sbuf.c.
References SBFREE, SBMALLOC, SBUF_CANEXTEND, sbuf_extendsize(), SBUF_ISDYNAMIC, SBUF_MALLOCFLAG, and SBUF_SETFLAG.
Referenced by sbuf_bcopyin(), sbuf_copyin(), sbuf_put_byte(), and sbuf_put_bytes().
|
static |
Definition at line 150 of file subr_sbuf.c.
References SBUF_MAXEXTENDINCR, SBUF_MAXEXTENDSIZE, and SBUF_MINEXTENDSIZE.
Referenced by sbuf_extend(), and sbuf_new().
int sbuf_finish | ( | struct sbuf * | s | ) |
Definition at line 833 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, sbuf_drain(), SBUF_NULINCLUDED, and SBUF_SETFLAG.
Referenced by coredump(), corefile_open(), corehdr(), cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), devaddq(), devctl_notify(), device_get_path(), device_log(), device_printf(), device_sysctl_handler(), dumpdevname_sysctl_handler(), exec_shell_imgact(), fail_point_sysctl(), fail_point_sysctl_status(), imgact_binmisc_exec(), kdb_sysctl_available(), kern_abort2(), mount_argf(), mount_devctl_event(), note_procstat_auxv(), note_procstat_files(), note_procstat_vmmap(), note_prpsinfo(), preload_dump(), sonewconn(), stats_tpl_list_available(), stats_tpl_sample_rates(), sysctl_debug_tslog(), sysctl_debug_tslog_user(), sysctl_debug_witness_badstacks(), sysctl_debug_witness_fullgraph(), sysctl_devices(), sysctl_kern_console(), sysctl_kern_eventtimer_choice(), sysctl_kern_malloc_stats(), sysctl_kern_proc_args(), sysctl_kern_proc_auxv(), sysctl_kern_proc_cwd(), sysctl_kern_proc_env(), sysctl_kern_proc_filedesc(), sysctl_kern_proc_vmmap(), sysctl_kern_timecounter_choice(), sysctl_log(), sysctl_out_proc(), sysctl_posix_shm_list(), sysctl_preload_dump(), sysctl_vfs_root_mount_hold(), sysctl_warn_reuse(), tty_info(), vfs_mountroot(), witness_checkorder(), and witness_debugger().
int sbuf_get_flags | ( | struct sbuf * | s | ) |
Definition at line 292 of file subr_sbuf.c.
ssize_t sbuf_len | ( | struct sbuf * | s | ) |
Definition at line 877 of file subr_sbuf.c.
References assert_sbuf_integrity, SBUF_ISFINISHED, and SBUF_NULINCLUDED.
Referenced by corefile_open(), cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), device_get_path(), device_log(), mount_argf(), note_prpsinfo(), sonewconn(), stats_tpl_sample_rates(), sysctl_debug_witness_badstacks(), sysctl_kern_console(), sysctl_kern_eventtimer_choice(), sysctl_log(), and sysctl_vfs_root_mount_hold().
struct sbuf * sbuf_new | ( | struct sbuf * | s, |
char * | buf, | ||
int | length, | ||
int | flags | ||
) |
Definition at line 196 of file subr_sbuf.c.
References buf, flags, SBFREE, SBMALLOC, SBUF_CANEXTEND, sbuf_extendsize(), SBUF_ISDYNSTRUCT, SBUF_MALLOCFLAG, SBUF_MINSIZE, and SBUF_SETFLAG.
Referenced by corefile_open(), corehdr(), cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), devctl_alloc_dei_sb(), device_get_path(), device_log(), device_printf(), fail_point_sysctl(), fail_point_sysctl_status(), kern_abort2(), mount_devctl_event(), note_procstat_auxv(), note_procstat_files(), note_procstat_vmmap(), note_prpsinfo(), preload_dump(), sbuf_new_for_sysctl(), sbuf_uionew(), sonewconn(), stats_tpl_list_available(), stats_tpl_sample_rates(), sysctl_debug_witness_badstacks(), sysctl_devices(), sysctl_kern_console(), sysctl_kern_eventtimer_choice(), sysctl_log(), sysctl_vfs_root_mount_hold(), sysctl_warn_reuse(), tty_info(), witness_checkorder(), and witness_debugger().
int sbuf_nl_terminate | ( | struct sbuf * | s | ) |
Definition at line 768 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, SBUF_ISDRAINATEOL, and sbuf_put_byte().
Referenced by stack_sbuf_print_flags().
int sbuf_printf | ( | struct sbuf * | s, |
const char * | fmt, | ||
... | |||
) |
Definition at line 739 of file subr_sbuf.c.
References result, and sbuf_vprintf().
Referenced by boottrace_display(), bus_generic_get_device_path(), coredump(), corefile_open(), cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), device_log(), device_printf(), dump_gap_stats(), exec_shell_imgact(), fail_point_get(), imgact_binmisc_exec(), kdb_sysctl_available(), kern_abort2(), mount_devctl_event(), preload_dump_internal(), preload_modinfo_value(), sbuf_hexdump(), sbuf_print_witness_badstacks(), sonewconn(), stack_sbuf_print_flags(), stats_tpl_list_available(), stats_tpl_sample_rates(), stats_v1_itercb_tostr_freeform(), stats_v1_itercb_tostr_json(), stats_voistatdata_hist_tostr(), stats_voistatdata_tdgst_tostr(), stats_voistatdata_tostr(), sysctl_debug_tslog(), sysctl_debug_tslog_user(), sysctl_debug_witness_fullgraph(), sysctl_kern_console(), sysctl_kern_eventtimer_choice(), sysctl_kern_timecounter_choice(), sysctl_vfs_root_mount_hold(), sysctl_warn_reuse(), tty_info(), vfs_mountroot_conf0(), vfs_mountroot_readconf(), witness_add_fullgraph(), and witness_checkorder().
|
static |
Definition at line 480 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, sbuf_drain(), sbuf_extend(), SBUF_FREESPACE, and SBUF_ISSECTION.
Referenced by sbuf_end_section(), sbuf_nl_terminate(), sbuf_putc(), and sbuf_putc_func().
|
static |
Definition at line 444 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, buf, sbuf_drain(), sbuf_extend(), SBUF_FREESPACE, and SBUF_ISSECTION.
Referenced by sbuf_bcat(), and sbuf_cat().
int sbuf_putc | ( | struct sbuf * | s, |
int | c | ||
) |
Definition at line 754 of file subr_sbuf.c.
References sbuf_put_byte().
Referenced by coredump(), corefile_open(), devaddq(), devctl_notify(), devctl_safe_quote_sb(), dumpdevname_sysctl_handler(), mount_devctl_event(), note_procstat_files(), preload_dump_internal(), putnote(), stats_v1_itercb_tostr_json(), stats_voistatdata_hist_tostr(), stats_voistatdata_tdgst_tostr(), sysctl_devices(), sysctl_kern_eventtimer_choice(), sysctl_kern_timecounter_choice(), and sysctl_vfs_root_mount_hold().
|
static |
Definition at line 642 of file subr_sbuf.c.
References sbuf_put_byte().
Referenced by sbuf_vprintf().
void sbuf_set_drain | ( | struct sbuf * | s, |
sbuf_drain_func * | func, | ||
void * | ctx | ||
) |
Definition at line 376 of file subr_sbuf.c.
References assert_sbuf_integrity, and assert_sbuf_state.
Referenced by corehdr(), device_printf(), fail_point_sysctl(), fail_point_sysctl_status(), note_procstat_auxv(), note_procstat_files(), note_procstat_vmmap(), preload_dump(), sbuf_new_for_sysctl(), sysctl_warn_reuse(), tty_info(), witness_checkorder(), and witness_debugger().
void sbuf_set_flags | ( | struct sbuf * | s, |
int | flags | ||
) |
Definition at line 306 of file subr_sbuf.c.
References flags.
int sbuf_setpos | ( | struct sbuf * | s, |
ssize_t | pos | ||
) |
Definition at line 336 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, and SBUF_ISSECTION.
void sbuf_start_section | ( | struct sbuf * | s, |
ssize_t * | old_lenp | ||
) |
Definition at line 927 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, SBUF_ISSECTION, and SBUF_SETFLAG.
Referenced by corehdr(), note_procstat_files(), and putnote().
int sbuf_trim | ( | struct sbuf * | s | ) |
Definition at line 799 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, and SBUF_ISSECTION.
Referenced by cpufreq_levels_sysctl(), cpufreq_settings_sysctl(), and kern_abort2().
struct sbuf * sbuf_uionew | ( | struct sbuf * | s, |
struct uio * | uio, | ||
int * | error | ||
) |
Definition at line 261 of file subr_sbuf.c.
References sbuf_delete(), SBUF_ISSECTION, SBUF_MINSIZE, sbuf_new(), and uiomove().
int sbuf_vprintf | ( | struct sbuf * | s, |
const char * | fmt, | ||
va_list | ap | ||
) |
Definition at line 650 of file subr_sbuf.c.
References assert_sbuf_integrity, assert_sbuf_state, kvprintf(), and sbuf_putc_func().
Referenced by device_log(), device_printf(), mount_argf(), and sbuf_printf().