diff options
Diffstat (limited to 'cmd/sbc_harness/fs_harness_uptime_txt.c')
-rw-r--r-- | cmd/sbc_harness/fs_harness_uptime_txt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/sbc_harness/fs_harness_uptime_txt.c b/cmd/sbc_harness/fs_harness_uptime_txt.c index f7b755f..97246ea 100644 --- a/cmd/sbc_harness/fs_harness_uptime_txt.c +++ b/cmd/sbc_harness/fs_harness_uptime_txt.c @@ -4,11 +4,10 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include <stdio.h> /* for snprintf() */ - #include <libhw/generic/alarmclock.h> #include <util9p/static.h> #include <libmisc/alloc.h> /* for heap_alloc(), free() */ +#include <libmisc/fmt.h> /* for fmt_snprint() */ #include "fs_harness_uptime_txt.h" @@ -120,7 +119,7 @@ static void uptime_fio_pread(struct uptime_fio *self, struct lib9p_srv_ctx *ctx, if (byte_offset == 0 || self->buf_len == 0) { uint64_t now = LO_CALL(bootclock, get_time_ns); - self->buf_len = snprintf(self->buf, sizeof(self->buf), "%"PRIu64"ns\n", now); + self->buf_len = fmt_snprint(self->buf, sizeof(self->buf), now, "ns\n"); } if (byte_offset > (uint64_t)self->buf_len) { |