mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
bcachefs: CLASS(printbuf)
Add a DEFINE_CLASS() for printbufs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -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:
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user