summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_sample.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2004-07-20 17:15:38 +0000
committerjulian <julian@FreeBSD.org>2004-07-20 17:15:38 +0000
commit8c938ed70a0b0d695f2d2c2577503b1b3b9365ec (patch)
tree1ffde5acbe2efbfe316cb725d560740f7caca117 /sys/netgraph/ng_sample.c
parent4254b3bd2255d9046d99d1394abc7c3f3ba744b7 (diff)
downloadFreeBSD-src-8c938ed70a0b0d695f2d2c2577503b1b3b9365ec.zip
FreeBSD-src-8c938ed70a0b0d695f2d2c2577503b1b3b9365ec.tar.gz
Slight cosmetic changes.
Also introduce a macro to be called by persistent nodes to signal their persistence during shutdown to hide this mechanism from the node author. Make node flags have a consistent style in naming. Document the change.
Diffstat (limited to 'sys/netgraph/ng_sample.c')
-rw-r--r--sys/netgraph/ng_sample.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c
index 48b58c7..b41cee2 100644
--- a/sys/netgraph/ng_sample.c
+++ b/sys/netgraph/ng_sample.c
@@ -408,8 +408,8 @@ devintr()
* All our links and the name have already been removed.
* If we are a persistant device, we might refuse to go away.
* In the case of a persistant node we signal the framework that we
- * are still in business by clearing the NG_INVALID bit. However
- * If we find the NG_REALLY_DIE bit set, this means that
+ * are still in business by clearing the NGF_INVALID bit. However
+ * If we find the NGF_REALLY_DIE bit set, this means that
* we REALLY need to die (e.g. hardware removed).
* This would have been set using the NG_NODE_REALLY_DIE(node)
* macro in some device dependent function (not shown here) before
@@ -425,7 +425,7 @@ ng_xxx_shutdown(node_p node)
NG_NODE_UNREF(privdata->node);
FREE(privdata, M_NETGRAPH);
#else
- if (node->nd_flags & NG_REALLY_DIE) {
+ if (node->nd_flags & NGF_REALLY_DIE) {
/*
* WE came here because the widget card is being unloaded,
* so stop being persistant.
@@ -436,7 +436,7 @@ ng_xxx_shutdown(node_p node)
FREE(privdata, M_NETGRAPH);
return (0);
}
- node->nd_flags &= ~NG_INVALID; /* reset invalid flag */
+ NG_NODE_REVIVE(node); /* tell ng_rmnode() we will persist */
#endif /* PERSISTANT_NODE */
return (0);
}
OpenPOWER on IntegriCloud