From 0ea3482342b4d7d6e71f3007ce4dafe445c639fd Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 13 Nov 1995 07:19:10 +0000 Subject: [PATCH] Replaced nosys() by lkm_nullcmd(). Always call lkm load/unload/stat functions instead of skipping the call if the function is nosys(). nosys() returned the wrong value as well as having the wrong type. --- lkm/coff/coff.c | 5 +++-- lkm/ibcs2/ibcs2.c | 4 ++-- lkm/ipfw/ipfw_lkm.c | 3 +-- lkm/linux/linux.c | 4 ++-- lkm/syscons/blank/blank_saver.c | 5 +++-- lkm/syscons/fade/fade_saver.c | 5 +++-- lkm/syscons/green/green_saver.c | 5 +++-- lkm/syscons/snake/snake_saver.c | 5 +++-- lkm/syscons/star/star_saver.c | 5 +++-- sys/dev/syscons/blank/blank_saver.c | 5 +++-- sys/dev/syscons/fade/fade_saver.c | 5 +++-- sys/dev/syscons/green/green_saver.c | 5 +++-- sys/dev/syscons/snake/snake_saver.c | 5 +++-- sys/dev/syscons/star/star_saver.c | 5 +++-- sys/modules/coff/coff.c | 5 +++-- sys/modules/ibcs2/ibcs2.c | 4 ++-- sys/modules/linux/linux.c | 4 ++-- sys/modules/syscons/blank/blank_saver.c | 5 +++-- sys/modules/syscons/fade/fade_saver.c | 5 +++-- sys/modules/syscons/green/green_saver.c | 5 +++-- sys/modules/syscons/snake/snake_saver.c | 5 +++-- sys/modules/syscons/star/star_saver.c | 5 +++-- sys/sys/kernel.h | 4 ++-- sys/sys/lkm.h | 15 +++++++-------- 24 files changed, 69 insertions(+), 54 deletions(-) diff --git a/lkm/coff/coff.c b/lkm/coff/coff.c index 9dd711760619..67a4480da8c7 100644 --- a/lkm/coff/coff.c +++ b/lkm/coff/coff.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: coff.c,v 1.2 1995/05/30 06:06:00 rgrimes Exp $ + * $Id: coff.c,v 1.3 1995/10/28 12:34:58 peter Exp $ */ #include @@ -54,5 +54,6 @@ ibcs2_coff_unload(struct lkm_table *lkmtp, int cmd) ibcs2_coff_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, ibcs2_coff_load, ibcs2_coff_unload, nosys); + DISPATCH(lkmtp, cmd, ver, ibcs2_coff_load, ibcs2_coff_unload, + lkm_nullcmd); } diff --git a/lkm/ibcs2/ibcs2.c b/lkm/ibcs2/ibcs2.c index b39f3907af3e..4db2adf65eb5 100644 --- a/lkm/ibcs2/ibcs2.c +++ b/lkm/ibcs2/ibcs2.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ibcs2.c,v 1.4 1995/10/10 08:20:28 swallace Exp $ + * $Id: ibcs2.c,v 1.5 1995/10/28 12:35:03 peter Exp $ */ #include @@ -59,5 +59,5 @@ ibcs2_unload(struct lkm_table *lkmtp, int cmd) int ibcs2_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, ibcs2_load, ibcs2_unload, nosys); + DISPATCH(lkmtp, cmd, ver, ibcs2_load, ibcs2_unload, lkm_nullcmd); } diff --git a/lkm/ipfw/ipfw_lkm.c b/lkm/ipfw/ipfw_lkm.c index a197766a9c55..6bf6fabe1e37 100644 --- a/lkm/ipfw/ipfw_lkm.c +++ b/lkm/ipfw/ipfw_lkm.c @@ -86,6 +86,5 @@ int s=splnet(); ipfw_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, ipfw_load, ipfw_unload, nosys); + DISPATCH(lkmtp, cmd, ver, ipfw_load, ipfw_unload, lkm_nullcmd); } - diff --git a/lkm/linux/linux.c b/lkm/linux/linux.c index 7d586641e036..852251a8764e 100644 --- a/lkm/linux/linux.c +++ b/lkm/linux/linux.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux.c,v 1.1 1995/06/25 17:29:48 sos Exp $ + * $Id: linux.c,v 1.2 1995/10/28 12:35:07 peter Exp $ */ #include @@ -54,5 +54,5 @@ linux_unload(struct lkm_table *lkmtp, int cmd) linux_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, linux_load, linux_unload, nosys); + DISPATCH(lkmtp, cmd, ver, linux_load, linux_unload, lkm_nullcmd); } diff --git a/lkm/syscons/blank/blank_saver.c b/lkm/syscons/blank/blank_saver.c index 439adc88222e..226d7d31221e 100644 --- a/lkm/syscons/blank/blank_saver.c +++ b/lkm/syscons/blank/blank_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: blank_saver.c,v 1.2 1995/05/30 06:06:13 rgrimes Exp $ + * $Id: blank_saver.c,v 1.3 1995/10/28 12:35:09 peter Exp $ */ #include @@ -77,5 +77,6 @@ blank_saver_unload(struct lkm_table *lkmtp, int cmd) blank_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload, + lkm_nullcmd); } diff --git a/lkm/syscons/fade/fade_saver.c b/lkm/syscons/fade/fade_saver.c index b3dadaf17578..9dc522598a41 100644 --- a/lkm/syscons/fade/fade_saver.c +++ b/lkm/syscons/fade/fade_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: fade_saver.c,v 1.2 1995/05/30 06:06:15 rgrimes Exp $ + * $Id: fade_saver.c,v 1.3 1995/10/28 12:35:10 peter Exp $ */ #include @@ -92,5 +92,6 @@ fade_saver_unload(struct lkm_table *lkmtp, int cmd) fade_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, fade_saver_load, fade_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, fade_saver_load, fade_saver_unload, + lkm_nullcmd); } diff --git a/lkm/syscons/green/green_saver.c b/lkm/syscons/green/green_saver.c index 24b2a58252f9..b52e8ad7ae04 100644 --- a/lkm/syscons/green/green_saver.c +++ b/lkm/syscons/green/green_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: green_saver.c,v 1.2 1995/05/30 06:06:17 rgrimes Exp $ + * $Id: green_saver.c,v 1.3 1995/10/28 12:35:11 peter Exp $ */ #include @@ -81,5 +81,6 @@ green_saver_unload(struct lkm_table *lkmtp, int cmd) green_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload, + lkm_nullcmd); } diff --git a/lkm/syscons/snake/snake_saver.c b/lkm/syscons/snake/snake_saver.c index 7a44bcdd726e..d8ae95a95fc6 100644 --- a/lkm/syscons/snake/snake_saver.c +++ b/lkm/syscons/snake/snake_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: snake_saver.c,v 1.5 1995/09/04 03:02:08 peter Exp $ + * $Id: snake_saver.c,v 1.6 1995/10/28 12:35:12 peter Exp $ */ #include @@ -118,5 +118,6 @@ snake_saver_unload(struct lkm_table *lkmtp, int cmd) snake_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, snake_saver_load, snake_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, snake_saver_load, snake_saver_unload, + lkm_nullcmd); } diff --git a/lkm/syscons/star/star_saver.c b/lkm/syscons/star/star_saver.c index f78996bf1053..6090f3e30bce 100644 --- a/lkm/syscons/star/star_saver.c +++ b/lkm/syscons/star/star_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: star_saver.c,v 1.3 1995/05/30 06:06:20 rgrimes Exp $ + * $Id: star_saver.c,v 1.4 1995/10/28 12:35:14 peter Exp $ */ #include @@ -108,5 +108,6 @@ star_saver_unload(struct lkm_table *lkmtp, int cmd) star_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, star_saver_load, star_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, star_saver_load, star_saver_unload, + lkm_nullcmd); } diff --git a/sys/dev/syscons/blank/blank_saver.c b/sys/dev/syscons/blank/blank_saver.c index 439adc88222e..226d7d31221e 100644 --- a/sys/dev/syscons/blank/blank_saver.c +++ b/sys/dev/syscons/blank/blank_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: blank_saver.c,v 1.2 1995/05/30 06:06:13 rgrimes Exp $ + * $Id: blank_saver.c,v 1.3 1995/10/28 12:35:09 peter Exp $ */ #include @@ -77,5 +77,6 @@ blank_saver_unload(struct lkm_table *lkmtp, int cmd) blank_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload, + lkm_nullcmd); } diff --git a/sys/dev/syscons/fade/fade_saver.c b/sys/dev/syscons/fade/fade_saver.c index b3dadaf17578..9dc522598a41 100644 --- a/sys/dev/syscons/fade/fade_saver.c +++ b/sys/dev/syscons/fade/fade_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: fade_saver.c,v 1.2 1995/05/30 06:06:15 rgrimes Exp $ + * $Id: fade_saver.c,v 1.3 1995/10/28 12:35:10 peter Exp $ */ #include @@ -92,5 +92,6 @@ fade_saver_unload(struct lkm_table *lkmtp, int cmd) fade_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, fade_saver_load, fade_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, fade_saver_load, fade_saver_unload, + lkm_nullcmd); } diff --git a/sys/dev/syscons/green/green_saver.c b/sys/dev/syscons/green/green_saver.c index 24b2a58252f9..b52e8ad7ae04 100644 --- a/sys/dev/syscons/green/green_saver.c +++ b/sys/dev/syscons/green/green_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: green_saver.c,v 1.2 1995/05/30 06:06:17 rgrimes Exp $ + * $Id: green_saver.c,v 1.3 1995/10/28 12:35:11 peter Exp $ */ #include @@ -81,5 +81,6 @@ green_saver_unload(struct lkm_table *lkmtp, int cmd) green_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload, + lkm_nullcmd); } diff --git a/sys/dev/syscons/snake/snake_saver.c b/sys/dev/syscons/snake/snake_saver.c index 7a44bcdd726e..d8ae95a95fc6 100644 --- a/sys/dev/syscons/snake/snake_saver.c +++ b/sys/dev/syscons/snake/snake_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: snake_saver.c,v 1.5 1995/09/04 03:02:08 peter Exp $ + * $Id: snake_saver.c,v 1.6 1995/10/28 12:35:12 peter Exp $ */ #include @@ -118,5 +118,6 @@ snake_saver_unload(struct lkm_table *lkmtp, int cmd) snake_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, snake_saver_load, snake_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, snake_saver_load, snake_saver_unload, + lkm_nullcmd); } diff --git a/sys/dev/syscons/star/star_saver.c b/sys/dev/syscons/star/star_saver.c index f78996bf1053..6090f3e30bce 100644 --- a/sys/dev/syscons/star/star_saver.c +++ b/sys/dev/syscons/star/star_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: star_saver.c,v 1.3 1995/05/30 06:06:20 rgrimes Exp $ + * $Id: star_saver.c,v 1.4 1995/10/28 12:35:14 peter Exp $ */ #include @@ -108,5 +108,6 @@ star_saver_unload(struct lkm_table *lkmtp, int cmd) star_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, star_saver_load, star_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, star_saver_load, star_saver_unload, + lkm_nullcmd); } diff --git a/sys/modules/coff/coff.c b/sys/modules/coff/coff.c index 9dd711760619..67a4480da8c7 100644 --- a/sys/modules/coff/coff.c +++ b/sys/modules/coff/coff.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: coff.c,v 1.2 1995/05/30 06:06:00 rgrimes Exp $ + * $Id: coff.c,v 1.3 1995/10/28 12:34:58 peter Exp $ */ #include @@ -54,5 +54,6 @@ ibcs2_coff_unload(struct lkm_table *lkmtp, int cmd) ibcs2_coff_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, ibcs2_coff_load, ibcs2_coff_unload, nosys); + DISPATCH(lkmtp, cmd, ver, ibcs2_coff_load, ibcs2_coff_unload, + lkm_nullcmd); } diff --git a/sys/modules/ibcs2/ibcs2.c b/sys/modules/ibcs2/ibcs2.c index b39f3907af3e..4db2adf65eb5 100644 --- a/sys/modules/ibcs2/ibcs2.c +++ b/sys/modules/ibcs2/ibcs2.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ibcs2.c,v 1.4 1995/10/10 08:20:28 swallace Exp $ + * $Id: ibcs2.c,v 1.5 1995/10/28 12:35:03 peter Exp $ */ #include @@ -59,5 +59,5 @@ ibcs2_unload(struct lkm_table *lkmtp, int cmd) int ibcs2_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, ibcs2_load, ibcs2_unload, nosys); + DISPATCH(lkmtp, cmd, ver, ibcs2_load, ibcs2_unload, lkm_nullcmd); } diff --git a/sys/modules/linux/linux.c b/sys/modules/linux/linux.c index 7d586641e036..852251a8764e 100644 --- a/sys/modules/linux/linux.c +++ b/sys/modules/linux/linux.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux.c,v 1.1 1995/06/25 17:29:48 sos Exp $ + * $Id: linux.c,v 1.2 1995/10/28 12:35:07 peter Exp $ */ #include @@ -54,5 +54,5 @@ linux_unload(struct lkm_table *lkmtp, int cmd) linux_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, linux_load, linux_unload, nosys); + DISPATCH(lkmtp, cmd, ver, linux_load, linux_unload, lkm_nullcmd); } diff --git a/sys/modules/syscons/blank/blank_saver.c b/sys/modules/syscons/blank/blank_saver.c index 439adc88222e..226d7d31221e 100644 --- a/sys/modules/syscons/blank/blank_saver.c +++ b/sys/modules/syscons/blank/blank_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: blank_saver.c,v 1.2 1995/05/30 06:06:13 rgrimes Exp $ + * $Id: blank_saver.c,v 1.3 1995/10/28 12:35:09 peter Exp $ */ #include @@ -77,5 +77,6 @@ blank_saver_unload(struct lkm_table *lkmtp, int cmd) blank_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload, + lkm_nullcmd); } diff --git a/sys/modules/syscons/fade/fade_saver.c b/sys/modules/syscons/fade/fade_saver.c index b3dadaf17578..9dc522598a41 100644 --- a/sys/modules/syscons/fade/fade_saver.c +++ b/sys/modules/syscons/fade/fade_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: fade_saver.c,v 1.2 1995/05/30 06:06:15 rgrimes Exp $ + * $Id: fade_saver.c,v 1.3 1995/10/28 12:35:10 peter Exp $ */ #include @@ -92,5 +92,6 @@ fade_saver_unload(struct lkm_table *lkmtp, int cmd) fade_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, fade_saver_load, fade_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, fade_saver_load, fade_saver_unload, + lkm_nullcmd); } diff --git a/sys/modules/syscons/green/green_saver.c b/sys/modules/syscons/green/green_saver.c index 24b2a58252f9..b52e8ad7ae04 100644 --- a/sys/modules/syscons/green/green_saver.c +++ b/sys/modules/syscons/green/green_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: green_saver.c,v 1.2 1995/05/30 06:06:17 rgrimes Exp $ + * $Id: green_saver.c,v 1.3 1995/10/28 12:35:11 peter Exp $ */ #include @@ -81,5 +81,6 @@ green_saver_unload(struct lkm_table *lkmtp, int cmd) green_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload, + lkm_nullcmd); } diff --git a/sys/modules/syscons/snake/snake_saver.c b/sys/modules/syscons/snake/snake_saver.c index 7a44bcdd726e..d8ae95a95fc6 100644 --- a/sys/modules/syscons/snake/snake_saver.c +++ b/sys/modules/syscons/snake/snake_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: snake_saver.c,v 1.5 1995/09/04 03:02:08 peter Exp $ + * $Id: snake_saver.c,v 1.6 1995/10/28 12:35:12 peter Exp $ */ #include @@ -118,5 +118,6 @@ snake_saver_unload(struct lkm_table *lkmtp, int cmd) snake_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, snake_saver_load, snake_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, snake_saver_load, snake_saver_unload, + lkm_nullcmd); } diff --git a/sys/modules/syscons/star/star_saver.c b/sys/modules/syscons/star/star_saver.c index f78996bf1053..6090f3e30bce 100644 --- a/sys/modules/syscons/star/star_saver.c +++ b/sys/modules/syscons/star/star_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: star_saver.c,v 1.3 1995/05/30 06:06:20 rgrimes Exp $ + * $Id: star_saver.c,v 1.4 1995/10/28 12:35:14 peter Exp $ */ #include @@ -108,5 +108,6 @@ star_saver_unload(struct lkm_table *lkmtp, int cmd) star_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { - DISPATCH(lkmtp, cmd, ver, star_saver_load, star_saver_unload, nosys); + DISPATCH(lkmtp, cmd, ver, star_saver_load, star_saver_unload, + lkm_nullcmd); } diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 4a8bd8e43f6e..80ec9369e00e 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)kernel.h 8.3 (Berkeley) 1/21/94 - * $Id: kernel.h,v 1.12 1995/09/03 05:43:50 julian Exp $ + * $Id: kernel.h,v 1.13 1995/09/09 18:10:29 davidg Exp $ */ #ifndef _SYS_KERNEL_H_ @@ -244,7 +244,7 @@ extern void kproc_start __P((void *udata)); int \ name ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \ DISPATCH(lkmtp, cmd, ver, name ## _load, name ## _unload, \ - nosys); } + lkm_nullcmd); } #else /* PSEUDO_LKM */ /* diff --git a/sys/sys/lkm.h b/sys/sys/lkm.h index d6b3922f50af..6a7a523eb5ca 100644 --- a/sys/sys/lkm.h +++ b/sys/sys/lkm.h @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: lkm.h,v 1.7 1995/08/05 07:39:02 davidg Exp $ */ #ifndef _SYS_LKM_H_ @@ -254,16 +254,14 @@ struct lkm_table { }; -extern int nosys(); /* * DISPATCH -- body function for use in module entry point function; * generally, the function body will consist entirely of a single * DISPATCH line. * - * If load/unload/stat are not "nosys", then they are called on each - * corresponding entry instance. "cmd" is passed to each function so - * that a single function can be used if desired. + * Call load/unload/stat on each corresponding entry instance. "cmd" is + * passed to each function so that a single function can be used if desired. */ #define DISPATCH(lkmtp,cmd,ver,load,unload,stat) \ if (ver != LKM_VERSION) \ @@ -274,15 +272,15 @@ extern int nosys(); lkmtp->private.lkm_any = (struct lkm_any *)&_module; \ if (lkmexists(lkmtp)) /* !!! */ \ return EEXIST; \ - if (load != nosys && (error = load(lkmtp, cmd))) \ + if ((error = load(lkmtp, cmd))) \ return error; \ break; \ case LKM_E_UNLOAD: \ - if (unload != nosys && (error = unload(lkmtp, cmd))) \ + if ((error = unload(lkmtp, cmd))) \ return error; \ break; \ case LKM_E_STAT: \ - if (stat != nosys && (error = stat(lkmtp, cmd))) \ + if ((error = stat(lkmtp, cmd))) \ return error; \ break; \ } \ @@ -290,6 +288,7 @@ extern int nosys(); int lkmdispatch __P((struct lkm_table *lkmtp, int cmd)); int lkmexists __P((struct lkm_table *lkmtp)); +int lkm_nullcmd __P((struct lkm_table *lkmtp, int cmd)); #endif /* KERNEL */