sdev_vtops.c revision b127ac411761a3d8d642d9342d9cac2785e1faaa
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * CDDL HEADER START
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * The contents of this file are subject to the terms of the
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Common Development and Distribution License (the "License").
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * You may not use this file except in compliance with the License.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * or http://www.opensolaris.org/os/licensing.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * See the License for the specific language governing permissions
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * and limitations under the License.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * When distributing Covered Code, include this CDDL HEADER in each
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * If applicable, add the following below this CDDL HEADER, with the
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * fields enclosed by brackets "[]" replaced with your own identifying
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * information: Portions Copyright [yyyy] [name of copyright owner]
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * CDDL HEADER END
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Use is subject to license terms.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * vnode ops for the /dev/vt directory
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy/* warlock in this file only cares about variables shared by vt and devfs */
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy_NOTE(SCHEME_PROTECTS_DATA("Do not care", sdev_node vattr vnode))
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy#define isdigit(ch) ((ch) >= '0' && (ch) <= '9')
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy/* attributes for VT nodes */
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy AT_TYPE|AT_MODE|AT_UID|AT_GID, /* va_mask */
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy S_IFCHR | DEVVT_DEVMODE_DEFAULT, /* va_mode */
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy 0 /* 0 hereafter */
52244c0958bdf281ca42932b449f644b4decfdc2John Wren Kennedydevvt_str2minor(const char *nm, minor_t *mp)
return (EINVAL);
return (SDEV_VTOR_SKIP);
return (SDEV_VTOR_INVALID);
return (SDEV_VTOR_VALID);
return (SDEV_VTOR_INVALID);
return (SDEV_VTOR_INVALID);
return (SDEV_VTOR_VALID);
return (SDEV_VTOR_INVALID);
#ifndef __lock_lint
devvt_create_rvp(0, 0, 0, 0, 0, 0);
if (error == 0) {
case VCHR:
case VDIR:
case VLNK:
return (error);
int error;
case SDEV_VTOR_VALID:
case SDEV_VTOR_SKIP:
case SDEV_VTOR_INVALID:
case SDEV_VTOR_STALE:
int found = 0;
#ifndef __lock_lint
found = 0;
if (!found) {
found = 0;
if (!found)
#ifndef __lock_lint
int error;
NULL)) != 0) {
return (error);
if (error) {
return (error);