Automatically load the "snp" module if it isn't already present.

This commit is contained in:
Dima Dorfman 2001-09-09 14:57:48 +00:00
parent 052548e983
commit fc66e618b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83249

View File

@ -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();