• Kent Overstreet's avatar
    bcachefs: printbuf improvements · acce32a5
    Kent Overstreet authored
    - fix assorted (harmless) off-by-one errors
    - we were inconsistent on whether out->pos stays <= out->size on
      overflow; now it does, and printbuf.overflow exists to indicate if a
      printbuf has overflowed
    - factor out printbuf_advance_pos()
    - printbuf_nul_terminate_reserved(); use this to reduce the number of
      printbuf_make_room() calls
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    acce32a5
printbuf.c 10.4 KB