| 2449 | } |
| 2450 | |
| 2451 | struct sbuf * |
| 2452 | sbuf_new_for_sysctl(struct sbuf *s, char *buf, int length, |
| 2453 | struct sysctl_req *req) |
| 2454 | { |
| 2455 | |
| 2456 | /* Supply a default buffer size if none given. */ |
| 2457 | if (buf == NULL && length == 0) |
| 2458 | length = 64; |
| 2459 | s = sbuf_new(s, buf, length, SBUF_FIXEDLEN | SBUF_INCLUDENUL); |
| 2460 | sbuf_set_drain(s, sbuf_sysctl_drain, req); |
| 2461 | return (s); |
| 2462 | } |
| 2463 | |
| 2464 | #ifdef DDB |
| 2465 |
no test coverage detected