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

Function db_capture_write

freebsd/ddb/db_capture.c:206–219  ·  view source on GitHub ↗

* Routines for capturing DDB output into a fixed-size buffer. These are * invoked from DDB's input and output routines. If we hit the limit on the * buffer, we simply drop further data. */

Source from the content-addressed store, hash-verified

204 * buffer, we simply drop further data.
205 */
206void
207db_capture_write(char *buffer, u_int buflen)
208{
209 u_int len;
210
211 if (db_capture_inprogress == 0 || db_capture_inpager)
212 return;
213 len = min(buflen, db_capture_bufsize - db_capture_bufoff);
214 bcopy(buffer, db_capture_buf + db_capture_bufoff, len);
215 db_capture_bufoff += len;
216
217 KASSERT(db_capture_bufoff <= db_capture_bufsize,
218 ("db_capture_write: bufoff > bufsize"));
219}
220
221void
222db_capture_writech(char ch)

Callers 2

db_readlineFunction · 0.85
db_capture_writechFunction · 0.85

Calls 1

minFunction · 0.85

Tested by

no test coverage detected