prvfsops.c revision d7de0cea9111a93d26efcfa259585dabbde02eea
/*
* 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 (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include <sys/sysmacros.h>
#include <sys/vfs_opreg.h>
/*
* This is the loadable module wrapper.
*/
static int prinit();
static mntopts_t proc_mntopts = {
NULL,
0
};
"proc",
};
/*
* Module linkage information for the kernel.
*/
};
static struct modlinkage modlinkage = {
};
int
_init(void)
{
return (mod_install(&modlinkage));
}
int
{
}
/*
* N.B.
* No _fini routine. The module cannot be unloaded once loaded.
* The NO_UNLOAD_STUB in modstubs.s must change if this module
* is ever modified to become unloadable.
*/
int nproc_highbit; /* highbit(v.v_nproc) */
static int procfstype;
static major_t procfs_major;
static minor_t procfs_minor;
static kmutex_t procfs_minor_lock;
static kmutex_t pr_mount_lock;
/*
* /proc VFS operations vector.
*/
static void
{
}
static int
{
static const fs_operation_def_t pr_vfsops_template[] = {
};
extern const fs_operation_def_t pr_vnodeops_template[];
int error;
procfstype = fstype;
ASSERT(procfstype != 0);
/*
* Associate VFS ops vector with this fstype.
*/
if (error != 0) {
return (error);
}
/*
* Set up vnode ops vector too.
*/
if (error != 0) {
(void) vfs_freevfsops_by_type(fstype);
return (error);
}
/*
* Assign a unique "device" number (used by stat(2)).
*/
procfs_major = 0;
}
return (0);
}
/* ARGSUSED */
static int
{
return (EPERM);
return (ENOTDIR);
if (zone == global_zone) {
return (EBUSY);
}
/*
* Having the resource be anything but "proc" doesn't make sense
*/
return (EBUSY);
}
/*
* find an available minor device number for this mount
*/
do {
return (0);
}
/* ARGSUSED */
static int
{
return (EPERM);
}
/*
* forced unmount is not supported by this file system
* and thus, ENOTSUP, is being returned.
*/
return (ENOTSUP);
}
/*
* Ensure that no /proc vnodes are in use on this mount point.
*/
return (EBUSY);
}
vn_invalid(vp);
return (0);
}
/* ARGSUSED */
static int
{
return (0);
}
static int
{
int n;
return (0);
}