Hi, I'm very new to the FreeBSD world. I need to write some BIOS information to a file, but as I figured the function I need, (bios_oem_strings(9)), can be called only from kernel mode.
I do the following:
and of course compilation failed with CC (clang). What can I do to call bios_oem_strings(9) and write the result to a file?
I do the following:
Code:
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/param.h>
#include <machine/pmap.h>
#include <machine/pc/bios.h>
struct bios_oem tmp;
int main()
{
unsigned char buf[128];
bzero(buf, 128);
bios_oem_strings(&tmp, buf, 127);
return 0;
}