MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sbuf_start_section

Function sbuf_start_section

freebsd/kern/subr_sbuf.c:899–919  ·  view source on GitHub ↗

* Start a section. */

Source from the content-addressed store, hash-verified

897 * Start a section.
898 */
899void
900sbuf_start_section(struct sbuf *s, ssize_t *old_lenp)
901{
902
903 assert_sbuf_integrity(s);
904 assert_sbuf_state(s, 0);
905
906 if (!SBUF_ISSECTION(s)) {
907 KASSERT(s->s_sect_len == 0,
908 ("s_sect_len != 0 when starting a section"));
909 if (old_lenp != NULL)
910 *old_lenp = -1;
911 s->s_rec_off = s->s_len;
912 SBUF_SETFLAG(s, SBUF_INSECTION);
913 } else {
914 KASSERT(old_lenp != NULL,
915 ("s_sect_len should be saved when starting a subsection"));
916 *old_lenp = s->s_sect_len;
917 s->s_sect_len = 0;
918 }
919}
920
921/*
922 * End the section padding to the specified length with the specified

Callers 3

__elfN(corehdr)Function · 0.85
__elfN(putnote)Function · 0.85
note_procstat_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected