Last active
August 29, 2015 14:18
-
-
Save waitman/f572053c0307a39f11e2 to your computer and use it in GitHub Desktop.
test.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <err.h> | |
#include <fcntl.h> | |
#include <kvm.h> | |
#include <limits.h> | |
#include <nlist.h> | |
static struct nlist nl[] = { | |
#define N_HCI_RAW 0 | |
{ "_ng_btsocket_hci_raw_sockets" }, | |
}; | |
int | |
main(int argc, char *argv[]) | |
{ | |
kvm_t *kvmd = NULL; | |
char errbuf[_POSIX2_LINE_MAX]; | |
kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); | |
kvm_nlist(kvmd, nl); | |
if (nl[0].n_type == 0) { | |
printf("error: %s\n",kvm_geterr(kvmd)); | |
} | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment