modsubr.c revision c8742f6496e41bcf40b54b09b48835c42f91e574
199767f8919635c4928607450d9e0abb932109ceToomas Soome * CDDL HEADER START
199767f8919635c4928607450d9e0abb932109ceToomas Soome * The contents of this file are subject to the terms of the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Common Development and Distribution License (the "License").
199767f8919635c4928607450d9e0abb932109ceToomas Soome * You may not use this file except in compliance with the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
199767f8919635c4928607450d9e0abb932109ceToomas Soome * See the License for the specific language governing permissions
199767f8919635c4928607450d9e0abb932109ceToomas Soome * and limitations under the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * When distributing Covered Code, include this CDDL HEADER in each
199767f8919635c4928607450d9e0abb932109ceToomas Soome * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * If applicable, add the following below this CDDL HEADER, with the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * fields enclosed by brackets "[]" replaced with your own identifying
199767f8919635c4928607450d9e0abb932109ceToomas Soome * information: Portions Copyright [yyyy] [name of copyright owner]
199767f8919635c4928607450d9e0abb932109ceToomas Soome * CDDL HEADER END
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
struct mod_noload {
char *mn_name;
static int nm_hash(char *);
static void make_syscallname(char *, int);
static void hwc_hash_init();
struct dev_ops *
int loaded;
char *drvname;
return (NULL);
return (NULL);
if (loaded) {
return (ops);
#ifdef DEBUG_RELE
#ifdef DEBUG_RELE
if (mod_rele_pause)
struct dev_ops *
char *name;
return (NULL);
char *name;
return (EINVAL);
char *filenamep;
p = name;
filenamep = p;
p = namebuf;
*p++ = *filenamep++;
char *funcname;
return (EFAULT);
return (EFAULT);
struct modctl *
return (modp);
return (NULL);
* Attach driver.conf info to devnames for a driver
struct par_list *
int err;
return (NULL);
return (NULL);
if (props)
while (tmp) {
if (!i_ddi_io_initialized()) {
return (pl);
* Destroy driver.conf info in devnames array for a driver
int hash = 0;
hash ^= c;
for (i = 0; i < MOD_BIND_HASHSIZE; i++) {
static struct bind *
return (mb);
for (i = 0; i < MOD_BIND_HASHSIZE; i++) {
return (DDI_MAJOR_T_NONE);
return (NULL);
int hshndx;
static char dupwarn[] =
"in /etc/name_to_major.";
char *copy;
return (EINVAL);
return (EINVAL);
return (EINVAL);
int hshndx;
"/etc/name_to_sysnum.",
"It conflicts with \"%s %d\" in /etc/name_to_sysnum.",
* driver.conf file translates to a list of hwc_spec's. Adding and
* This is the case when driver.conf specifies multiple
char *key;
while (spec) {
while (spec) {
while (*listp)
while (entry) {
* changing the format of driver.conf file.
struct hwc_spec *
extern void i_ddi_free_exported_classes(char **, int);
int i, nclass;
char **classes;
char *bindname;
char *drvname;
deviname++;
for (i = 0; i < nclass; i++) {
&val) == 0)
return (list);