From e38a2d29292ad3fad64729ef958ff07e3bca02cf Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 15 May 2025 01:59:17 -0600 Subject: Fully banish printf from the firmware --- cmd/sbc_harness/fs_harness_uptime_txt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd/sbc_harness/fs_harness_uptime_txt.c') 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 /* for snprintf() */ - #include #include #include /* for heap_alloc(), free() */ +#include /* 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) { -- cgit v1.2.3-2-g168b