From cf1db3ca684843192b96cfe705c390ab67450818 Mon Sep 17 00:00:00 2001 From: dd Date: Sun, 9 Sep 2001 14:57:48 +0000 Subject: Automatically load the "snp" module if it isn't already present. --- usr.sbin/watch/watch.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'usr.sbin/watch') diff --git a/usr.sbin/watch/watch.c b/usr.sbin/watch/watch.c index 1cf09b9..710adbf 100644 --- a/usr.sbin/watch/watch.c +++ b/usr.sbin/watch/watch.c @@ -23,6 +23,8 @@ static const char rcsid[] = #include #include #include +#include +#include #include #include @@ -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(); -- cgit v1.1