Refactor putbuf() so that it can be used as a generic output sink. Add
sbuf_putbuf() to utilize this. This allows buffers to be written
atomically without bouncing through the buffer length limitations of
printf() and PRINTF_BUFR_SIZE.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 7782 Build 7929: arc lint + arc unit
Event Timeline
Comment Actions
Looks reasonable, assuming the code cut and paste into prf_putbuf was correct to start with.
Comment Actions
I think this looks good, but we should also look at what it would take to put a drain mode in as well.
Comment Actions
Need input on naming. sbuf_putbuf() was named since it wraps putbuf(). Is this the best name, though? Also, should it be kernel only, and the userland be something else that suggests printing to stdout vs stderr vs some other file descriptor?
Comment Actions
dj_mc_sbuf_putbuff_iii_this_time_its_personal_esq is the obvious choice.
Please remember to bump .Dd, and credit me in the comments for the name.