diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-09-02 19:17:34 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-09-02 19:17:34 +0000 |
commit | db901281608f0c69c05dd9ab366155d3225f0fd2 (patch) | |
tree | 7a2608d6dcb635a62d8e1c2979ae0dee7f977a8e /sys/sys/conf.h | |
parent | f3dcf66158f676bb2cac90e97fbf004a59ff8383 (diff) | |
download | src-db901281608f0c69c05dd9ab366155d3225f0fd2.tar.gz src-db901281608f0c69c05dd9ab366155d3225f0fd2.zip |
Avoid the modules madness I inadvertently introduced by making the
cloning infrastructure standard in kern_conf. Modules are now
the same with or without devfs support.
If you need to detect if devfs is present, in modules or elsewhere,
check the integer variable "devfs_present".
This happily removes an ugly hack from kern/vfs_conf.c.
This forces a rename of the eventhandler and the standard clone
helper function.
Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include
like <sys/queue.h>
Remove all #includes of opt_devfs.h they no longer matter.
Notes
Notes:
svn path=/head/; revision=65374
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r-- | sys/sys/conf.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h index e68c0eaeac9f..28fbf03e28e6 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -45,6 +45,7 @@ #define _SYS_CONF_H_ #include <sys/queue.h> +#include <sys/eventhandler.h> #define SPECNAMELEN 15 @@ -135,10 +136,6 @@ typedef int l_rint_t __P((int c, struct tty *tp)); typedef int l_start_t __P((struct tty *tp)); typedef int l_modem_t __P((struct tty *tp, int flag)); -/* This is type of the function DEVFS uses to hook into the kernel with */ -typedef void devfs_create_t __P((dev_t dev)); -typedef void devfs_remove_t __P((dev_t dev)); - /* * XXX: The dummy argument can be used to do what strategy1() never * did anywhere: Create a per device flag to lock the device during @@ -299,7 +296,13 @@ int lminor __P((dev_t dev)); void setconf __P((void)); dev_t getdiskbyname(char *name); +/* This is type of the function DEVFS uses to hook into the kernel with */ +typedef void devfs_create_t __P((dev_t dev)); +typedef void devfs_destroy_t __P((dev_t dev)); + extern devfs_create_t *devfs_create_hook; +extern devfs_destroy_t *devfs_destroy_hook; +extern int devfs_present; /* * XXX: This included for when DEVFS resurfaces @@ -316,6 +319,10 @@ extern devfs_create_t *devfs_create_hook; #define GID_GAMES 13 #define GID_DIALER 68 +typedef void (*dev_clone_fn) __P((void *arg, char *name, int namelen, dev_t *result)); + +int dev_stdclone __P((char *name, char **namep, char *stem, int *unit)); +EVENTHANDLER_DECLARE(dev_clone, dev_clone_fn); #endif /* _KERNEL */ #endif /* !_SYS_CONF_H_ */ |