xref: /titanic_52/usr/src/uts/common/sys/statfs.h (revision a29e56d91db891741f1af9f6bbd3e3c3cac5f19b)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24  *
25  * Copyright 1996 Sun Microsystems, Inc.  All rights reserved.
26  * Use is subject to license terms.
27  */
28 
29 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30 /*	  All Rights Reserved  	*/
31 
32 #ifndef _SYS_STATFS_H
33 #define	_SYS_STATFS_H
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  * Structure returned by statfs(2) and fstatfs(2).
41  * This structure and associated system calls have been replaced
42  * by statvfs(2) and fstatvfs(2) and will be removed from the system
43  * in a near-future release.
44  */
45 
46 struct	statfs {
47 	short	f_fstyp;	/* File system type */
48 	long	f_bsize;	/* Block size */
49 	long	f_frsize;	/* Fragment size (if supported) */
50 	long	f_blocks;	/* Total number of blocks on file system */
51 	long	f_bfree;	/* Total number of free blocks */
52 	ino_t	f_files;	/* Total number of file nodes (inodes) */
53 	ino_t	f_ffree;	/* Total number of free file nodes */
54 	char	f_fname[6];	/* Volume name */
55 	char	f_fpack[6];	/* Pack name */
56 };
57 
58 #ifdef _SYSCALL32
59 
60 struct statfs32 {
61 	int16_t	f_fstyp;
62 	int32_t	f_bsize;
63 	int32_t f_frsize;
64 	int32_t	f_blocks;
65 	int32_t	f_bfree;
66 	ino32_t	f_files;
67 	ino32_t	f_ffree;
68 	char	f_fname[6];
69 	char	f_fpack[6];
70 };
71 
72 #endif	/* _SYSCALL32 */
73 
74 #if !defined(_KERNEL)
75 int statfs(const char *, struct statfs *, int, int);
76 int fstatfs(int, struct statfs *, int, int);
77 #endif
78 
79 #ifdef	__cplusplus
80 }
81 #endif
82 
83 #endif	/* _SYS_STATFS_H */
84