bcachefs: CLASS(printbuf)

Add a DEFINE_CLASS() for printbufs.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2025-05-25 02:59:35 -04:00
parent a0f7437906
commit 237a8e16bd

View file

@ -140,6 +140,14 @@ void bch2_prt_bitflags_vector(struct printbuf *, const char * const[],
.size = _size, \
})
static inline struct printbuf bch2_printbuf_init(void)
{
return PRINTBUF;
}
DEFINE_CLASS(printbuf, struct printbuf,
bch2_printbuf_exit(&_T), bch2_printbuf_init(), void)
/*
* Returns size remaining of output buffer:
*/