diff options
Diffstat (limited to 'usr/src/uts/common/os/devcfg.c')
-rw-r--r-- | usr/src/uts/common/os/devcfg.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr/src/uts/common/os/devcfg.c b/usr/src/uts/common/os/devcfg.c index 48ce29785d..bfc829934f 100644 --- a/usr/src/uts/common/os/devcfg.c +++ b/usr/src/uts/common/os/devcfg.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -6637,6 +6637,20 @@ i_ddi_devs_attached(major_t major) return (error); } +int +i_ddi_minor_node_count(dev_info_t *ddip, const char *node_type) +{ + struct ddi_minor_data *dp; + int count = 0; + + mutex_enter(&(DEVI(ddip)->devi_lock)); + for (dp = DEVI(ddip)->devi_minor; dp != NULL; dp = dp->next) + if (strcmp(dp->ddm_node_type, node_type) == 0) + count++; + mutex_exit(&(DEVI(ddip)->devi_lock)); + return (count); +} + /* * ddi_hold_installed_driver configures and attaches all * instances of the specified driver. To accomplish this |