From b3e24f9ce91bb200d621c57bfa92eac473a435f9 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Tue, 14 Nov 1995 07:35:57 +0000 Subject: Changed the first (name) arg of MOD_DEV(), MOD_EXEC() and MOD_MISC() from a string to an identifier so that it can be used to generate declarations and strings. It's much easier to stringize an identifier than to identifize a string. A uniform naming scheme must be used for the automatically generated things to apply. This is a feature. Used the module identifer to generate prototypes for the module load, unload and stat functions. Removed the few prototypes for these that already existed. Used the module identifier to generate a unique struct tag in MOD_DEV(). This should probably be done for all the MOD_*() macros. Moved the trailing semicolon from the MOD_*() macro definitions to the macro invocations that didn't already (bogusly) have it. Staticized the module load and unload functions. Added function return types for the module load, unload and stat functions. lkm/ibcs2/ibcs2.c: Included to get everything prototyped. Cleaned up #includes. lkm/ibcs2/ipfw.c: Cleaned up #includes. lkm/linux/linux.c: The module name had to change from "linux_emulator" to "linux_mod" to be automatically generated. Cleaned up #includes. lkm/syscons/*/*_saver.c: Completed delcarations of function pointers. sys/i386/isa/atapi.c: The module name had to change from "atapi" to "atapi_mod" to be automatically generated. sys/i386/isa/wcd.c: Used the fixed MOD_DEV(). This module has two devices and expanded the macro in the source instead of fixing it. The module names had to change from "wcd" and "rwcd" to "wcd_mod" and "rwcd_mod" to be automatically generated. sys/pccard/pcic.c: The module name had to change from "pcic" to "pcic_mod" to be automatically generated. --- sys/dev/syscons/blank/blank_saver.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sys/dev/syscons/blank/blank_saver.c') diff --git a/sys/dev/syscons/blank/blank_saver.c b/sys/dev/syscons/blank/blank_saver.c index 226d7d31221e..83a03866a5ef 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.3 1995/10/28 12:35:09 peter Exp $ + * $Id: blank_saver.c,v 1.4 1995/11/13 07:18:43 bde Exp $ */ #include @@ -37,10 +37,10 @@ #include #include -MOD_MISC("blank_saver") +MOD_MISC(blank_saver); -void (*current_saver)(); -void (*old_saver)(); +void (*current_saver)(int blank); +void (*old_saver)(int blank); static void blank_saver(int blank) @@ -58,6 +58,7 @@ blank_saver(int blank) } } +static int blank_saver_load(struct lkm_table *lkmtp, int cmd) { (*current_saver)(0); @@ -67,6 +68,7 @@ blank_saver_load(struct lkm_table *lkmtp, int cmd) return 0; } +static int blank_saver_unload(struct lkm_table *lkmtp, int cmd) { (*current_saver)(0); @@ -75,6 +77,7 @@ blank_saver_unload(struct lkm_table *lkmtp, int cmd) return 0; } +int blank_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) { DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload, -- cgit v1.2.3