GETBOOTFILE(3)
π GETBOOTFILE(3) π
okay so this is a Library Functions Manual page, bestie β it's giving βwhere did my kernel even come from?β energy, and the answer is a whole function. no cap. π
πΈ NAME πΈ
getbootfile β get kernel boot file name
π LIBRARY π
Standard C Library (libc, -lc) β the classic libc girlies, periodt. π«Ά
π§ SYNOPSIS π§
#include <paths.h>
const char *
getbootfile(void);
β¨ DESCRIPTION β¨
okay so getbootfile() literally retrieves the full pathname of the file from which the current kernel was loaded, and returns a static pointer to the name. main character behavior tbh. π
and a read/write interface to this information is available via the sysctl(3) MIB variable βkern.bootfileβ. iykyk. π¦
π RETURN VALUES π
If the call succeeds, a string giving the pathname is returned. slay. β¨
If it fails, a null pointer is returned and an error code is placed in the global location errno. not the vibe, but good to know. π
π«Ά SEE ALSO π«Ά
sysctl(3)β go read that one too, bestie.
π HISTORY π
The getbootfile() function appeared in FreeBSD 2.0. iconic lineage fr fr. π
π BUGS π
If the boot blocks have not been modified to pass this information into the kernel at boot time, the static string /boot/kernel/kernel is returned instead of the real boot file.
so yeah β if the boot blocks aren't doing their little job, you get that static string instead of the real boot file. noted. π
source/version: Debian Β· September 23, 1994 β byeee bestie, go check your boot file π β¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 1983, 1991, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms