summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1996-01-21 09:03:15 +0000
committerjulian <julian@FreeBSD.org>1996-01-21 09:03:15 +0000
commitacadd91a43d91ac85b2154f7426acce628cde8cb (patch)
tree9d6595d70d494b6c9e898a4d9d95a47065584a4c
parent8ead8d0e84e458f4df1b0ee97358eb265632858e (diff)
downloadFreeBSD-src-acadd91a43d91ac85b2154f7426acce628cde8cb.zip
FreeBSD-src-acadd91a43d91ac85b2154f7426acce628cde8cb.tar.gz
Submitted by: Bruce Evans (bde)
better naming for exported devfs function and better place for the prototype
-rw-r--r--sys/miscfs/devfs/devfs_proto.h1
-rw-r--r--sys/miscfs/devfs/devfs_tree.c12
-rw-r--r--sys/sys/devfsext.h5
3 files changed, 12 insertions, 6 deletions
diff --git a/sys/miscfs/devfs/devfs_proto.h b/sys/miscfs/devfs/devfs_proto.h
index 92bdb17..b6a52d5 100644
--- a/sys/miscfs/devfs/devfs_proto.h
+++ b/sys/miscfs/devfs/devfs_proto.h
@@ -7,7 +7,6 @@ int dev_add_node(int entrytype, union typeinfo *by, dn_p proto, dn_p *dn_pp) /*p
int dev_touch(devnm_p key) /* update the node for this dev */ /*proto*/;
void devfs_dn_free(dn_p dnp) /*proto*/;
int devfs_add_fronts(devnm_p parent,devnm_p child) /*proto*/;
-void dev_remove_dev(devnm_p devnmp) /*proto*/;
int dev_dup_plane(struct devfsmount *devfs_mp_p) /*proto*/;
void devfs_free_plane(struct devfsmount *devfs_mp_p) /*proto*/;
int dev_dup_entry(dn_p parent, devnm_p back, devnm_p *dnm_pp, struct devfsmount *dvm) /*proto*/;
diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c
index 599d8e1..94ebd52 100644
--- a/sys/miscfs/devfs/devfs_tree.c
+++ b/sys/miscfs/devfs/devfs_tree.c
@@ -2,7 +2,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
- * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.11 1995/12/09 09:11:01 julian Exp $
+ * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.12 1996/01/02 09:14:44 peter Exp $
*/
#include "param.h"
@@ -513,11 +513,13 @@ int devfs_add_fronts(devnm_p parent,devnm_p child) /*proto*/
* then the devfs_node will still exist as the ref count will be non-0
* removing a directory node will remove all sup-nodes on all planes (ZAP)
*
- * Used be device drivers to remove nodes that are no longer relevant
+ * Used by device drivers to remove nodes that are no longer relevant
+ * The argument is the 'cookie' they were given when they created the node
+ * this function is exported.. see sys/devfsext.h
***********************************************************************/
-void dev_remove_dev(devnm_p devnmp) /*proto*/
+void devfs_remove_dev(void *devnmp)
{
- DBPRINT(("dev_remove_dev\n"));
+ DBPRINT(("devfs_remove_dev\n"));
/*
* Keep removing the next front node till no more exist
*/
@@ -889,6 +891,7 @@ int dev_add_entry(char *name, dn_p parent, int type, union typeinfo *by, devnm_p
/***********************************************************************\
* Add the named device entry into the given directory, and make it *
* The appropriate type... (called (sometimes indirectly) by drivers..) *
+* this function is exported.. see sys/devfsext.h *
\***********************************************************************/
void *devfs_add_devsw(char *path,
char *name,
@@ -942,6 +945,7 @@ void *devfs_add_devsw(char *path,
/***********************************************************************\
* Add the named device entry into the given directory, and make it *
* a link to the already created device given as an arg.. *
+* this function is exported.. see sys/devfsext.h *
\***********************************************************************/
void *dev_link(char *path, char *name, void *original)
{
diff --git a/sys/sys/devfsext.h b/sys/sys/devfsext.h
index 2e9e4c6..9568c1c4 100644
--- a/sys/sys/devfsext.h
+++ b/sys/sys/devfsext.h
@@ -1,7 +1,7 @@
/* usual BSD style copyright here */
/* Written by Julian Elischer (julian@dialix.oz.au)*/
/*
- * $Id: devfsext.h,v 1.4 1995/12/08 11:19:28 julian Exp $
+ * $Id: devfsext.h,v 1.5 1995/12/09 09:11:25 julian Exp $
*/
#ifndef _SYS_DEVFSECT_H_
@@ -20,6 +20,9 @@ void *dev_link(char *path,
void *original); /* the result of a previous dev_link
or dev_add operation */
+/* remove the device the cookie represents */
+void devfs_remove_dev(void *devnmp);
+
#define DV_CHR 0
#define DV_BLK 1
#define DV_DEV 2
OpenPOWER on IntegriCloud