mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 02:22:43 +00:00
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