statvfs.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 */
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_STATVFS_H
#define _SYS_STATVFS_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.10 */
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Structure returned by statvfs(2).
*/
#define _FSTYPSZ 16
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
#ifndef FSTYPSZ
#endif
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
typedef struct statvfs {
unsigned long f_bsize; /* fundamental file system block size */
unsigned long f_frsize; /* fragment size */
unsigned long f_fsid; /* file system id (dev for now) */
/* null-terminated */
unsigned long f_flag; /* bit-mask of flags */
unsigned long f_namemax; /* maximum file name length */
#if !defined(_LP64)
#endif
} statvfs_t;
#if defined(_SYSCALL32)
/* Kernel view of user ILP32 statvfs structure */
typedef struct statvfs32 {
/* null-terminated */
} statvfs32_t;
#endif /* _SYSCALL32 */
/* transitional large file interface version */
#if defined(_LARGEFILE64_SOURCE)
typedef struct statvfs64 {
unsigned long f_bsize; /* preferred file system block size */
unsigned long f_frsize; /* fundamental file system block size */
unsigned long f_fsid; /* file system id (dev for now) */
/* null-terminated */
unsigned long f_flag; /* bit-mask of flags */
unsigned long f_namemax; /* maximum file name length */
#if !defined(_LP64)
#endif /* _LP64 */
} statvfs64_t;
#endif
#if defined(_SYSCALL32)
/* Kernel view of user ILP32 statvfs64 structure */
#pragma pack(4)
#endif
typedef struct statvfs64_32 {
/* null-terminated */
#pragma pack()
#endif
#endif /* _SYSCALL32 */
/*
* Flag definitions.
*/
#if !defined(_KERNEL)
/*
* large file compilation environment setup
*/
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#define statvfs_t statvfs64_t
#define fstatvfs fstatvfs64
#endif
#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */
#if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
/*
* In the LP64 compilation environment, map large file interfaces
* back to native versions where possible.
*/
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#define statvfs64_t statvfs_t
#define fstatvfs64 fstatvfs
#endif
#endif /* _LP64 && _LARGEFILE64_SOURCE */
#if defined(__STDC__)
/* transitional large file interface versions */
!defined(__PRAGMA_REDEFINE_EXTNAME))
int fstatvfs64(int, statvfs64_t *);
#endif /* _LARGEFILE64_SOURCE... */
#endif /* defined(__STDC__) */
#endif /* !defined(_KERNEL) */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_STATVFS_H */