From fc66e618b4e581f9d16f7f8db0e30d9014769290 Mon Sep 17 00:00:00 2001
From: Dima Dorfman
Date: Sun, 9 Sep 2001 14:57:48 +0000
Subject: [PATCH] Automatically load the "snp" module if it isn't already
present.
---
usr.sbin/watch/watch.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/usr.sbin/watch/watch.c b/usr.sbin/watch/watch.c
index 1cf09b94dd1..710adbfc209 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();