smb_fsd.c revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/feature_tests.h>
#include <smbsrv/smb_vops.h>
static void fsd_name_from_mntpoint(char *, const char *, size_t);
/*
* The "pathname" parameter may be either a path name or a volume name.
* Kernel caller must call fsd_rele(vfsp).
* User space caller will not have a hold on the fs.
*/
void *
{
int (*func)(const char *, const char *);
char vfs_volname[VOL_NAME_MAX];
char volname[VOL_NAME_MAX];
if (fsd)
do {
if (fsd) {
}
break;
} else {
}
return (vfs_found);
}
/*
* Compare two volume descriptors to determine whether or not they
* refer to the same volume. Returns 0 if the descriptors refer to
* the same volume. Otherwise returns 1.
*/
int
{
return (0);
}
return (1);
}
/*
* fsd_getattr
*
* Obtain volume attributes. If the volume is mounted, the attributes
* are copied to vol_attr. Otherwise, vol_attr is zero'd.
*
* Returns 0 on success. Otherwise an errno is returned to indicate
* the error.
*/
int
{
return (ESTALE);
return (0);
}
/*
* Check whether or not a file system supports the features identified
* by flags. Flags can be any combination of the FSOLF flags.
* Returns 1 if all of the features are supported. Otherwise returns 0.
* Exception: Returns -1 if stale fsd.
*/
int
{
unsigned getflags = 0;
if (!vfsp) {
return (-1);
}
return (1);
}
return (0);
}
void *
{
return (vfsp);
}
void
{
}
/*
* Returns volume name.
* Also fills in vol_attr->fs_typename (needed for fsd_getattr()).
*
* File system types are hardcoded in uts/common/os/vfs_conf.c .
*/
static void
{
}
/*
* Always set supports ACLs because the VFS will fake ACLs
* for file systems that don't support them.
*/
static void
{
flags |= FSOLF_READONLY;
flags |= FSOLF_STREAMS;
flags |= FSOLF_NO_ATIME;
flags |= FSOLF_NOEXPORT;
flags |= FSOLF_XVATTR;
}
/* ARGSUSED */
static void
{
/*
* This function is more complicated if there is
* DAVE support, but we have excised that code for
* the moment.
*/
*fs_sequence = 0;
}
/*
* This function parses out the first conponent of a mount path,
* used elsewhere as the volume name.
*
* For "/", the volume name is "" (i.e. ROOTVOL).
*/
static void
{
const char *s = mntpnt;
s += strspn(s, "/");
}