-static inline void pr_newline(struct printbuf *buf)
-{
- unsigned i;
-
- pr_char(buf, '\n');
-
- buf->last_newline = buf->pos;
-
- for (i = 0; i < buf->indent; i++)
- pr_char(buf, ' ');
-
- buf->last_field = buf->pos;
- buf->tabstop = 0;
-}
-
-static inline void pr_tab(struct printbuf *buf)
-{
- BUG_ON(buf->tabstop > ARRAY_SIZE(buf->tabstops));
-
- while (printbuf_remaining(buf) > 1 &&
- printbuf_linelen(buf) < buf->tabstops[buf->tabstop])
- pr_char(buf, ' ');
-
- buf->last_field = buf->pos;
- buf->tabstop++;
-}
-
-void bch2_pr_tab_rjust(struct printbuf *);
-
-static inline void pr_tab_rjust(struct printbuf *buf)
-{
- bch2_pr_tab_rjust(buf);
-}
-
-void bch2_pr_units(struct printbuf *, s64, s64);
-#define pr_units(...) bch2_pr_units(__VA_ARGS__)
-
-static inline void pr_sectors(struct printbuf *out, u64 v)
-{
- bch2_pr_units(out, v, v << 9);
-}
-
-#ifdef __KERNEL__
-static inline void pr_time(struct printbuf *out, u64 time)
-{
- pr_buf(out, "%llu", time);
-}
-#else
-#include <time.h>
-static inline void pr_time(struct printbuf *out, u64 _time)
-{
- char time_str[64];
- time_t time = _time;
- struct tm *tm = localtime(&time);
- size_t err = strftime(time_str, sizeof(time_str), "%c", tm);
- if (!err)
- pr_buf(out, "(formatting error)");
- else
- pr_buf(out, "%s", time_str);
-}
-#endif