bcachefs: Fix userspace bch2_prt_datetime()

ctime_r() outputs a newline, which we don't want.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-11-13 19:55:09 -05:00
parent e56978c80d
commit 5fd24caf57

View File

@ -322,6 +322,7 @@ void bch2_prt_datetime(struct printbuf *out, time64_t sec)
time_t t = sec;
char buf[64];
ctime_r(&t, buf);
strim(buf);
prt_str(out, buf);
}
#else