mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
bcachefs: CLASS(printbuf)
Add a DEFINE_CLASS() for printbufs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
a0f7437906
commit
237a8e16bd
1 changed files with 8 additions and 0 deletions
|
|
@ -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:
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue