man.bsd.lv manual page server

Manual Page Search Parameters

GETBOOTFILE(3) Library Functions Manual GETBOOTFILE(3)

getbootfileget kernel boot file name

library “libc”

#include <paths.h>

const char *
getbootfile(void);

The () function retrieves the full pathname of the file from which the current kernel was loaded, and returns a static pointer to the name. A read/write interface to this information is available via the sysctl(3) MIB variable kern.bootfile.

If the call succeeds a string giving the pathname is returned. If it fails, a null pointer is returned and an error code is placed in the global location errno.

sysctl(3)

The getbootfile() function call appeared in FreeBSD 2.0.

If the boot blocks have not been modified to pass this information into the kernel at boot time, the static string “/boot/kernel” is returned instead of the real boot file.

September 2, 2008 DragonFly-5.6.1