Automatically load the "snp" module if it isn't already present.
This commit is contained in:
parent
052548e983
commit
fc66e618b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83249
@ -23,6 +23,8 @@ static const char rcsid[] =
|
||||
#include <sys/filio.h>
|
||||
#include <sys/snoop.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/module.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <locale.h>
|
||||
@ -325,6 +327,10 @@ main(ac, av)
|
||||
usage();
|
||||
}
|
||||
|
||||
if (modfind("snp") == -1)
|
||||
if (kldload("snp") == -1 || modfind("snp") == -1)
|
||||
warn("snp module not available");
|
||||
|
||||
signal(SIGINT, cleanup);
|
||||
|
||||
setup_scr();
|
||||
|
Loading…
Reference in New Issue
Block a user