From e47f61e18396b6e5f61ee91b9f9f832976ee96cf Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 2 Sep 2000 19:17:34 +0000 Subject: 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 in : it's a helper #include like Remove all #includes of opt_devfs.h they no longer matter. --- sys/fs/devfs/devfs_devs.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'sys/fs/devfs/devfs_devs.c') diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index c3eb101..41a48c7 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -238,34 +238,12 @@ devfs_create(dev_t dev) } static void -devfs_remove(dev_t dev) +devfs_destroy(dev_t dev) { devfs_inot[dev->si_inode] = NULL; devfs_generation++; } devfs_create_t *devfs_create_hook = devfs_create; -devfs_remove_t *devfs_remove_hook = devfs_remove; - -int -devfs_stdclone(char *name, char **namep, char *stem, int *unit) -{ - int u, i; - - if (bcmp(stem, name, strlen(stem)) != 0) - return (0); - i = strlen(stem); - if (!isdigit(name[i])) - return (0); - u = 0; - while (isdigit(name[i])) { - u *= 10; - u += name[i++] - '0'; - } - *unit = u; - if (namep) - *namep = &name[i]; - if (name[i]) - return (2); - return (1); -} +devfs_destroy_t *devfs_destroy_hook = devfs_destroy; +int devfs_present = 1; -- cgit v1.1