sdev_nsconfig_mod.c revision facf4a8d7b59fde89a8662b4f4c73a758e6c402c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* this module implements the devname_ops to fetch
* a specific entry from a /etc/dev/devname_map file or
* a name service map.
*/
static int devname_remove(devname_handle_t *);
static int devname_rename(devname_handle_t *, char *);
struct cred *);
static struct devname_ops devname_ops = {
DEVNOPS_REV, /* devnops_rev, */
devname_lookup, /* devnops_lookup */
devname_remove, /* devnops_remove */
devname_rename, /* devnops_rename */
devname_getattr, /* devnops_getattr */
devname_readdir, /* devname_readdir */
devname_inactive /* devname_inactive */
};
/*
* Module linkage information for the kernel.
*/
"devname name service mod 1.0",
};
static struct modlinkage modlinkage = {
};
int
_init(void)
{
return (mod_install(&modlinkage));
}
int
_fini(void)
{
return (mod_remove(&modlinkage));
}
int
{
}
/*ARGSUSED2*/
static int
{
int error = 0;
goto errout;
}
if (error) {
goto errout;
}
goto errout;
}
if (error) {
goto errout;
}
(int)result->devname_spec);
if (args->devname_name)
if (args->devname_dir)
if (args->devname_map)
if (args)
if (result)
return (error);
}
/*ARGSUSED*/
static int
{
char *entry;
char *dir;
/* do not waste to do the map check */
return (0);
}
/*ARGSUSED*/
static int
{
char *entry;
return (EROFS);
}
/*ARGSUSED*/
static int
{
char *oname;
return (ENOTSUP);
}
/*ARGSUSED*/
static int
{
return (0);
}
/*ARGSUSED*/
static void
{
}