Revamp sbuf_put_byte() to sbuf_put_bytes() in the obvious fashion and
fixup callers.
Details
- Reviewers
markj jhb • ian - Commits
- rS288223: sbuf: Process more than one char at a time
The kproc sysctl was showing up in traces. Make sbuf append less pessimistic.
libsbuf compiles ok. I don't see any kyua tests for it, though.
Standard boilerplate: Is anyone waiting until they are less busy to give feedback? I'd like to commit this soon, so if I don't hear anything for 2-3 days I will go ahead. If you don't have time to review in 2-3 days but believe that *your personal* review must happen before this goes in, just let me know (and please give me an approximate time frame for review). Thanks!
I've been running this kernel (admittedly, not doing much) since yesterday.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I'll look at this more closely soon, but note (if you didn't know already) that sbuf is built in userland from lib/libsbuf and linked into a number of programs and libs. Might be useful for doing some ad-hoc testing.
No tests in libsbuf; mdconfig has tests and uses libgeom which links libsbuf. I tried running those with the objdir mdconfig and they seem to pass.
Tried usr.bin/apply; make test passes there as well.
IIRC there was some discussion about using sbuf at panic time when someone else brought this up before..
The ci thing is kind of ugly. Maybe provide a simple sbuf_put_byte() wrapper so that it isn't needed? Then the compiler can handle the int -> char conversion transparently.
I agree it's ugly. I only do that to avoid breaking ABI.
We could also just say "the ABI sucks" and replace int c arguments with char c and eliminate ci that way.
sys/kern/subr_sbuf.c | ||
---|---|---|
435 ↗ | (On Diff #8919) | Extra newline. |
sys/kern/subr_sbuf.c | ||
---|---|---|
435 ↗ | (On Diff #8919) | Will fix before checkin. |