diff options
| author | leo <leo@NetBSD.org> | 1996-03-07 10:25:28 +0000 |
|---|---|---|
| committer | leo <leo@NetBSD.org> | 1996-03-07 10:25:28 +0000 |
| commit | 6da2ce259cdee088aad1c90d3d1811fd234f191a (patch) | |
| tree | a826b6f7e9468d73c1b6c01ff5b840a2590c149f /sys/dev | |
| parent | 5dcce59678ce2ff58675b66710447dcb1bb84c48 (diff) | |
Allow for a machine dependent match function - rd_match_hook()
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/md.c | 10 | ||||
| -rw-r--r-- | sys/dev/md.h | 5 | ||||
| -rw-r--r-- | sys/dev/ramdisk.c | 10 | ||||
| -rw-r--r-- | sys/dev/ramdisk.h | 5 |
4 files changed, 24 insertions, 6 deletions
diff --git a/sys/dev/md.c b/sys/dev/md.c index ba786ba2b2e..f984f4148d8 100644 --- a/sys/dev/md.c +++ b/sys/dev/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.4 1996/01/07 22:03:31 thorpej Exp $ */ +/* $NetBSD: md.c,v 1.5 1996/03/07 10:26:29 leo Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -117,7 +117,15 @@ rd_match(parent, self, aux) void *self; void *aux; { +#ifdef RAMDISK_HOOKS + /* + * This external function allows for a machine dependent + * match function. + */ + return (rd_match_hook(parent, self, aux)); +#else return(1); +#endif } static void diff --git a/sys/dev/md.h b/sys/dev/md.h index 6b900b3d32f..03617866e1a 100644 --- a/sys/dev/md.h +++ b/sys/dev/md.h @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.2 1995/10/26 15:46:24 gwr Exp $ */ +/* $NetBSD: md.h,v 1.3 1996/03/07 10:26:31 leo Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -83,8 +83,9 @@ struct rd_conf { /* * If the option RAMDISK_HOOKS is on, then these functions are * called by the ramdisk driver to allow machine-dependent to - * configure and/or load each ramdisk unit. + * match/configure and/or load each ramdisk unit. */ +extern int rd_match_hook __P((struct device *, void *, void *)); extern void rd_attach_hook __P((int unit, struct rd_conf *)); extern void rd_open_hook __P((int unit, struct rd_conf *)); #endif diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index 38108098551..d788f49770b 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $NetBSD: ramdisk.c,v 1.4 1996/01/07 22:03:31 thorpej Exp $ */ +/* $NetBSD: ramdisk.c,v 1.5 1996/03/07 10:26:29 leo Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -117,7 +117,15 @@ rd_match(parent, self, aux) void *self; void *aux; { +#ifdef RAMDISK_HOOKS + /* + * This external function allows for a machine dependent + * match function. + */ + return (rd_match_hook(parent, self, aux)); +#else return(1); +#endif } static void diff --git a/sys/dev/ramdisk.h b/sys/dev/ramdisk.h index 551f65886a3..4212af83eaa 100644 --- a/sys/dev/ramdisk.h +++ b/sys/dev/ramdisk.h @@ -1,4 +1,4 @@ -/* $NetBSD: ramdisk.h,v 1.2 1995/10/26 15:46:24 gwr Exp $ */ +/* $NetBSD: ramdisk.h,v 1.3 1996/03/07 10:26:31 leo Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -83,8 +83,9 @@ struct rd_conf { /* * If the option RAMDISK_HOOKS is on, then these functions are * called by the ramdisk driver to allow machine-dependent to - * configure and/or load each ramdisk unit. + * match/configure and/or load each ramdisk unit. */ +extern int rd_match_hook __P((struct device *, void *, void *)); extern void rd_attach_hook __P((int unit, struct rd_conf *)); extern void rd_open_hook __P((int unit, struct rd_conf *)); #endif |
