/*
* 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.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Portions of this source code were derived from Berkeley 4.3 BSD
* under license from the Regents of the University of California.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Get file system statistics (statvfs and fstatvfs).
*/
#include <sys/inttypes.h>
#include <sys/pathname.h>
sizeof ((dst)->f_basetype)); \
/*
* Common routines for statvfs and fstatvfs.
*/
static int
{
int error;
#if !defined(lint)
#endif
return (error);
/*
* VFS_STATVFS can return data that is incompatible with the space
* available the 32-bit statvfs structure. Check here to see if
* it will fit into the 32-bit structure, if not, return EOVERFLOW.
*
* The check for -1 is because some file systems return -1 in the
* fields that are irrelevant or nonessential, and we do not want
* to return EOVERFLOW for them. For example: df is expected to
* show -1 in the output for some of these fields on NFS mounted
* filesystems.
*/
return (EOVERFLOW);
#ifdef _LP64
/*
* On the 64-bit kernel, even these fields grow to 64-bit
* quantities in the statvfs64 structure.
*/
return (EOVERFLOW);
#endif
return (EFAULT);
return (0);
}
static int
{
int error;
#if !defined(lint)
#endif
return (error);
return (EFAULT);
return (0);
}
/*
* Native system calls
*/
int
{
int error;
int estale_retry = 0;
goto lookup;
}
#ifdef _LP64
#else
#endif
if (error) {
goto lookup;
}
return (0);
}
int
{
int error;
#ifdef _LP64
#else
#endif
if (error)
return (0);
}
#if defined(_ILP32)
/*
* Large File system calls.
*
* (We deliberately don't have special "large file" system calls in the
* 64-bit kernel -- we just use the native versions, since they're just
* as functional.)
*/
int
{
int error;
int estale_retry = 0;
goto lookup;
}
if (error) {
goto lookup;
}
return (0);
}
int
{
int error;
if (error)
return (0);
}
#endif /* _ILP32 */
#ifdef _SYSCALL32_IMPL
static int
{
int error;
return (error);
/*
* On the 64-bit kernel, even these fields grow to 64-bit
* quantities in the statvfs64 structure.
*/
return (EOVERFLOW);
return (EFAULT);
return (0);
}
/*
* ILP32 "small file" system calls on LP64 kernel
*/
int
{
int error;
int estale_retry = 0;
goto lookup;
}
if (error) {
goto lookup;
}
return (0);
}
int
{
int error;
if (error)
return (0);
}
/*
* ILP32 Large File system calls on LP64 kernel
*/
int
{
int error;
int estale_retry = 0;
goto lookup;
}
if (error) {
goto lookup;
}
return (0);
}
int
{
int error;
if (error)
return (0);
}
#endif /* _SYSCALL32_IMPL */