Lines Matching refs:printbuf
76 struct printbuf { struct
104 int bch2_printbuf_make_room(struct printbuf *, unsigned); argument
105 __printf(2, 3) void bch2_prt_printf(struct printbuf *out, const char *fmt, ...);
106 __printf(2, 0) void bch2_prt_vprintf(struct printbuf *out, const char *fmt, va_list);
107 const char *bch2_printbuf_str(const struct printbuf *);
108 void bch2_printbuf_exit(struct printbuf *);
110 void bch2_printbuf_tabstops_reset(struct printbuf *);
111 void bch2_printbuf_tabstop_pop(struct printbuf *);
112 int bch2_printbuf_tabstop_push(struct printbuf *, unsigned);
114 void bch2_printbuf_indent_add(struct printbuf *, unsigned);
115 void bch2_printbuf_indent_sub(struct printbuf *, unsigned);
117 void bch2_prt_newline(struct printbuf *);
118 void bch2_printbuf_strip_trailing_newline(struct printbuf *);
119 void bch2_prt_tab(struct printbuf *);
120 void bch2_prt_tab_rjust(struct printbuf *);
122 void bch2_prt_bytes_indented(struct printbuf *, const char *, unsigned);
123 void bch2_prt_human_readable_u64(struct printbuf *, u64);
124 void bch2_prt_human_readable_s64(struct printbuf *, s64);
125 void bch2_prt_units_u64(struct printbuf *, u64);
126 void bch2_prt_units_s64(struct printbuf *, s64);
127 void bch2_prt_string_option(struct printbuf *, const char * const[], size_t);
128 void bch2_prt_bitflags(struct printbuf *, const char * const[], u64);
129 void bch2_prt_bitflags_vector(struct printbuf *, const char * const[],
133 #define PRINTBUF ((struct printbuf) { .heap_allocated = true })
137 ((struct printbuf) { \
145 static inline unsigned printbuf_remaining_size(struct printbuf *out) in printbuf_remaining_size()
156 static inline unsigned printbuf_remaining(struct printbuf *out) in printbuf_remaining()
161 static inline unsigned printbuf_written(struct printbuf *out) in printbuf_written()
166 static inline void printbuf_nul_terminate_reserved(struct printbuf *out) in printbuf_nul_terminate_reserved()
174 static inline void printbuf_nul_terminate(struct printbuf *out) in printbuf_nul_terminate()
181 static inline void __prt_char_reserved(struct printbuf *out, char c) in __prt_char_reserved()
188 static inline void __prt_char(struct printbuf *out, char c) in __prt_char()
194 static inline void prt_char(struct printbuf *out, char c) in prt_char()
201 static inline void __prt_chars_reserved(struct printbuf *out, char c, unsigned n) in __prt_chars_reserved()
209 static inline void prt_chars(struct printbuf *out, char c, unsigned n) in prt_chars()
216 static inline void prt_bytes(struct printbuf *out, const void *b, unsigned n) in prt_bytes()
228 static inline void prt_str(struct printbuf *out, const char *str) in prt_str()
233 static inline void prt_str_indented(struct printbuf *out, const char *str) in prt_str_indented()
238 static inline void prt_hex_byte(struct printbuf *out, u8 byte) in prt_hex_byte()
246 static inline void prt_hex_byte_upper(struct printbuf *out, u8 byte) in prt_hex_byte_upper()
257 static inline void printbuf_reset(struct printbuf *buf) in printbuf_reset()
269 static inline void printbuf_atomic_inc(struct printbuf *buf) in printbuf_atomic_inc()
277 static inline void printbuf_atomic_dec(struct printbuf *buf) in printbuf_atomic_dec()