Date: Wed, 9 Apr 2025 21:17:53 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b2bd8c9a1d87 - main - kboot: Move str* util routines to libkboot Message-ID: <202504092117.539LHrF6077990@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b2bd8c9a1d87ee60f13715370824c56f5ab7a4d2 commit b2bd8c9a1d87ee60f13715370824c56f5ab7a4d2 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-04-09 21:16:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-04-09 21:16:55 +0000 kboot: Move str* util routines to libkboot These are needed for the next round of EFI support for amd64 (partially shared with aarch64, but only partially because the Linux host interfaces are different to get the same info). Sponsored by: Netflix --- stand/kboot/include/util.h | 10 ++++++++++ stand/kboot/kboot/Makefile | 1 - stand/kboot/kboot/kboot.h | 5 +---- stand/kboot/libkboot/Makefile | 1 + stand/kboot/{kboot => libkboot}/util.c | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/stand/kboot/include/util.h b/stand/kboot/include/util.h new file mode 100644 index 000000000000..ca71277bc66a --- /dev/null +++ b/stand/kboot/include/util.h @@ -0,0 +1,10 @@ +/*- + * Copyright (c) 2022, Netflix, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +bool file2str(const char *fn, char *buffer, size_t buflen); +bool file2u64(const char *fn, uint64_t *val); diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index 0f6bb994711d..19bae09df5ea 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -25,7 +25,6 @@ SRCS= \ hostfs.c \ init.c \ main.c \ - util.c \ vers.c .if ${MK_FDT} != "no" diff --git a/stand/kboot/kboot/kboot.h b/stand/kboot/kboot/kboot.h index 2a6e98ae5513..cbacf8d1e453 100644 --- a/stand/kboot/kboot/kboot.h +++ b/stand/kboot/kboot/kboot.h @@ -33,10 +33,7 @@ const char *hostdisk_gen_probe(void); void hostdisk_zfs_probe(void); bool hostdisk_zfs_find_default(void); -/* util.c */ -bool file2str(const char *fn, char *buffer, size_t buflen); -bool file2u64(const char *fn, uint64_t *val); - #include "seg.h" +#include "util.h" #endif /* KBOOT_H */ diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile index 7acec951107a..249bfef817c5 100644 --- a/stand/kboot/libkboot/Makefile +++ b/stand/kboot/libkboot/Makefile @@ -11,6 +11,7 @@ SRCS+= host_syscall.S SRCS+= host_syscalls.c SRCS+= seg.c SRCS+= termios.c +SRCS+= util.c .sinclude "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" diff --git a/stand/kboot/kboot/util.c b/stand/kboot/libkboot/util.c similarity index 97% rename from stand/kboot/kboot/util.c rename to stand/kboot/libkboot/util.c index 7d467a29b059..0100a7cc5d8a 100644 --- a/stand/kboot/kboot/util.c +++ b/stand/kboot/libkboot/util.c @@ -6,7 +6,7 @@ #include "stand.h" #include "host_syscall.h" -#include "kboot.h" +#include "util.h" bool file2str(const char *fn, char *buffer, size_t buflen)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504092117.539LHrF6077990>