diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-20 04:52:44 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-17 15:44:22 -0400 |
commit | 59fe84c2200b7a43c4baf8d89c69aea2bc15c0ad (patch) | |
tree | 5c49ad4a42b29141b2a248dd0d9fe85df75b716b /fs/bcachefs/util.c | |
parent | 72e822f26e4289fb238009ee2051a22bfb75071e (diff) |
bcachefs: Kill bch_scnmemcpy()
bch_scnmemcpy was for printing length-limited strings that might not
have a terminating null - turns out sprintf & pr_buf can do this with
%.*s.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r-- | fs/bcachefs/util.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index 0bbea332fcaa..0cf09f13504b 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -579,19 +579,6 @@ void memcpy_from_bio(void *dst, struct bio *src, struct bvec_iter src_iter) } } -void bch_scnmemcpy(struct printbuf *out, - const char *src, size_t len) -{ - size_t n = printbuf_remaining(out); - - if (n) { - n = min(n - 1, len); - memcpy(out->pos, src, n); - out->pos += n; - *out->pos = '\0'; - } -} - #include "eytzinger.h" static int alignment_ok(const void *base, size_t align) |