getbootfile3
Get kernel boot file name
Usage
#include <paths.h>
const char *
getbootfile(void);
Library
Standard C Library (libc, -lc)
Overview
The getbootfile() 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”.
Return values
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.
Releases
87 releases since FreeBSD 2.0.5-RELEASE; the text changed 47 times.