/*
* 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
*/
/*
*/
/*
*/
#include <sys/sysmacros.h>
#include <sys/vfs_opreg.h>
/* warlock in this file only cares about variables shared by vt and devfs */
#define DEVVT_GID_DEFAULT (0)
/* attributes for VT nodes */
VCHR, /* va_type */
DEVVT_UID_DEFAULT, /* va_uid */
DEVVT_GID_DEFAULT, /* va_gid */
0 /* 0 hereafter */
};
struct vnodeops *
devvt_getvnodeops(void)
{
return (devvt_vnodeops);
}
static int
{
long uminor = 0;
return (EINVAL);
*mp = 0;
return (EINVAL);
}
return (0);
}
/*
* Validate that a node is up-to-date and correct.
* A validator may not update the node state or
* contents as a read lock permits entry by
* multiple threads.
*/
int
{
int rval;
/* validate only READY nodes */
sdcmn_err(("dev fs: skipping: node not ready %s(%p)",
return (SDEV_VTOR_SKIP);
}
return (SDEV_VTOR_INVALID);
return (rval);
}
return (rval);
}
return (SDEV_VTOR_INVALID);
}
return (SDEV_VTOR_INVALID);
return (SDEV_VTOR_VALID);
}
/*
* This callback is invoked from devname_lookup_func() to create
* a entry when the node is not found in the cache.
*/
/*ARGSUSED*/
static int
{
return (SDEV_VTOR_INVALID);
return (0);
}
return (0);
}
return (-1);
return (-1);
*vap = devvt_vattr;
return (0);
}
/*ARGSUSED3*/
static int
{
type = SDEV_VLINK;
} else {
type = SDEV_VATTR;
}
/* Give warlock a more clear call graph */
#ifndef __lock_lint
#else
devvt_create_rvp(0, 0, 0, 0, 0, 0);
#endif
if (error == 0) {
case VCHR:
break;
case VDIR:
case VLNK:
break;
default:
break;
}
}
return (error);
}
static void
{
int error;
return;
return;
return;
}
if (type & SDEV_VATTR) {
*vap = devvt_vattr;
} else if (type & SDEV_VLINK) {
*vap = sdev_vattr_lnk;
}
if (error != 0) {
return;
}
}
static void
{
char *link;
}
}
}
/*
* First step in refreshing directory contents.
* Remove each invalid entry and rebuild the link
* reference for each stale entry.
*/
static void
{
case SDEV_VTOR_VALID:
break;
case SDEV_VTOR_SKIP:
break;
case SDEV_VTOR_INVALID:
break;
/* remove the cached node */
break;
case SDEV_VTOR_STALE:
break;
}
}
}
static void
{
char found = 0;
/* We have to fool warlock this way, otherwise it will complain */
#ifndef __lock_lint
}
#else
#endif
/* 1. prune invalid nodes and rebuild stale symlinks */
/* 2. create missing nodes */
continue;
found = 0;
/* validate only ready nodes */
continue;
found = 1;
break;
}
}
if (!found) {
}
}
/* 3. create active link node and console user link node */
found = 0;
/* validate only ready nodes */
continue;
found |= 0x01;
found |= 0x02;
break;
}
if (!(found & 0x01))
if (!(found & 0x02))
#ifndef __lock_lint
#else
#endif
}
/*ARGSUSED4*/
static int
{
if (uiop->uio_offset == 0) {
}
}
/*
* We allow create to find existing nodes
* - if the node doesn't exist - EROFS
* - creating an existing dir read-only succeeds, otherwise EISDIR
* - exclusive creates fail - EEXIST
*/
/*ARGSUSED2*/
static int
{
int error;
NULL)) != 0) {
return (error);
}
else
if (error) {
} else
return (error);
}
};