Module Name:    src
Committed By:   pgoyette
Date:           Fri Mar 20 23:09:02 UTC 2020

Modified Files:
        src/sys/kern: kern_module.c

Log Message:
Improve error message - at least indicate which value comes from the
module vs which was requested/wanted by the caller.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/kern_module.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_module.c
diff -u src/sys/kern/kern_module.c:1.147 src/sys/kern/kern_module.c:1.148
--- src/sys/kern/kern_module.c:1.147	Sat Feb 22 19:51:57 2020
+++ src/sys/kern/kern_module.c	Fri Mar 20 23:09:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.147 2020/02/22 19:51:57 pgoyette Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.148 2020/03/20 23:09:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.147 2020/02/22 19:51:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.148 2020/03/20 23:09:01 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -136,8 +136,8 @@ static void	module_callback_unload(struc
 static void
 module_incompat(const modinfo_t *mi, int modclass)
 {
-	module_error("incompatible module class for `%s' (%d != %d)",
-	    mi->mi_name, modclass, mi->mi_class);
+	module_error("incompatible module class %d for `%s' (wanted %d)",
+	    mi->mi_class, mi->mi_name, modclass);
 }
 
 struct module *

Reply via email to