ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/statvf64.htm

304 lines
9.7 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>statvfs64()--Get File System Information (64-Bit Enabled)</title>
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Begin Header Records ========================================== -->
<!-- file cleaned -->
<!-- Unix2 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- 010411 JTROUS Add new field descriptions, V5R2, 98391 -->
<!-- 0206?? JET This file has undergone html cleanup June 2002 by JET -->
<!-- 021107 JTROUS Add desc to blksize,allocsize, V5R3 -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>statvfs64()--Get File System Information (64-Bit Enabled)</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;sys/statvfs.h&gt;
int statvfs64(const char <em>*path</em>, struct statvfs64 <em>*buf</em>)
</pre>
&nbsp;&nbsp;Service Program Name: QP0LLIB1<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Conditional; see <a href="#USAGE_NOTES">Usage Notes</a>.<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <strong>statvfs64()</strong> function gets status information about the
file system that contains the file named by the <em>path</em> argument. The
information is placed in the area of memory pointed to by the <em>buf</em>
argument.</p>
<p>If the named file is a symbolic link, <strong>statvfs64()</strong> resolves
the symbolic link.</p>
<p>For details about authorities required, error conditions, and examples, see
<a href="statvfs.htm">statvfs()</a>--Get File System Information.</p>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong><em>path</em></strong></dt>
<dd>(Input) A pointer to the null-terminated path name of the file from which
file system information is required.
<p>This parameter is assumed to be represented in the coded character set
identifier (CCSID) currently in effect for the job. If the CCSID of the job is
65535, this parameter is assumed to be represented in the default CCSID of the
job.</p>
<p>See <a href="statvfs64u.htm">QlgStatvfs64()--Get File System Information
(64-Bit enabled and using NLS-enabled path name)</a> for a description and an
example of supplying the <em>path</em> in any CCSID.</p>
<br>
</dd>
<dt><strong><em>buf</em></strong></dt>
<dd>(Output) A pointer to the area to which the information should be
written.</dd>
</dl>
<p>The information is returned in the following <samp>statvfs64</samp>
structure, as defined in the &lt;<strong>sys/statvfs.h</strong>&gt; header
file. Signed fields of the <samp>statvfs64</samp> structure that are not
supported by the mounted file system will be set to -1.</p>
<table border>
<tr>
<td align="left" valign="top" width="15%">unsigned long</td>
<td align="left" valign="top" width="15%">f_bsize</td>
<td align="left" valign="top" width="70%">The file system block size in bytes.
This number is the number of bytes in a block of disk unit storage.
Some file systems may return zero in this field. If this field is zero, then
the contents of the <samp>f_blocks</samp>, <samp>f_bfree</samp>, and <samp>
f_bavail</samp> fields are undefined.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_frsize</td>
<td align="left" valign="top">The fundamental file system block size in bytes.
Some file systems may return zero in this field. If this field is zero, then
the contents of the <samp>f_blocks</samp>, <samp>f_bfree</samp>, and <samp>
f_bavail</samp> fields are undefined.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long long</td>
<td align="left" valign="top">f_blocks</td>
<td align="left" valign="top">The total number of blocks in the file system in
terms of <samp>f_frsize</samp>.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long long</td>
<td align="left" valign="top">f_bfree</td>
<td align="left" valign="top">The total number of free blocks in the file
system.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long long</td>
<td align="left" valign="top">f_bavail</td>
<td align="left" valign="top">The total number of free blocks available to a
non-privileged process.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_files</td>
<td align="left" valign="top">The total number of file serial numbers.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_ffree</td>
<td align="left" valign="top">The total number of free file serial numbers.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_favail</td>
<td align="left" valign="top">The number of free file serial numbers available
to a non-privileged process.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_fsid</td>
<td align="left" valign="top">The file system ID. This field will be
4,294,967,295 if the value could not fit in the specified unsigned long
field.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_flag</td>
<td align="left" valign="top">File system flags. Symbols are defined in the
&lt;<strong>sys/statvfs.h</strong>&gt; header file to refer to bits in this
field (see <a href="statvfs.htm#HDRFFLAGS">The f_flags field</a>).<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_namemax</td>
<td align="left" valign="top">The maximum file name length in the file system.
Some file systems may return the maximum value that can be stored in an <samp>
unsigned long</samp> to indicate the file system has no maximum file name
length. The maximum value that can be stored in an <samp>unsigned long</samp>
is defined in &lt;<strong>limits.h</strong>&gt; as ULONG_MAX.
<p>This value is the number of bytes allowed in the file name if it were
encoded in the CCSID of the job. If the CCSID is mixed, this number is an
estimate and may be larger than the actual allowable maximum.<br>
<br>
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long</td>
<td align="left" valign="top">f_pathmax</td>
<td align="left" valign="top">The maximum path length in the file system. Some
file systems may return the maximum value that can be stored in an <samp>
unsigned long</samp> to indicate the file system has no maximum path length.
The maximum value that can be stored in an <samp>unsigned long</samp> is
defined in &lt;<strong>limits.h</strong>&gt; as ULONG_MAX.
<p>This value is the number of bytes allowed in the file name if it were
encoded in the CCSID of the job. If the CCSID is mixed, this number is an
estimate and may be larger than the actual allowable maximum.<br>
<br>
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">long</td>
<td align="left" valign="top">f_objlinkmax</td>
<td align="left" valign="top">The maximum number of hard links for objects
other than directories.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">long</td>
<td align="left" valign="top">f_dirlinkmax</td>
<td align="left" valign="top">The maximum number of hard links for a
directory.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">char</td>
<td align="left" valign="top">f_reserved1[4]</td>
<td align="left" valign="top">Reserved.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">unsigned long long</td>
<td align="left" valign="top">f_fsid64</td>
<td align="left" valign="top">The file system ID in 64 bit format.<br>
<br>
</td>
</tr>
<tr>
<td align="left" valign="top">char</td>
<td align="left" valign="top">f_basetype[80]</td>
<td align="left" valign="top">The NULL-terminated file system type name. The
text in this field will be returned in the CCSID (coded character set
identifier) currently in effect for the job. If the CCSID of the job is 65535,
this is assumed to be represented in the default CCSID of the job.</td>
</tr>
</table>
<p> For further details about the f_flags field, see <a href="statvfs.htm">
statvfs()--Get File System Information</a>.</p>
<br>
<h3><a name="USAGE_NOTES">Usage Notes</a></h3>
<ol type="1">
<li>When you develop in C-based languages, the prototypes for the 64-bit APIs
are normally hidden. To use the <strong>statvfs64()</strong> API or the
<strong>QlgStatvfs64()</strong> API and the <samp>struct statvfs64</samp> data
type, you must compile the source with the _LARGE_FILE_API macro defined.<br>
</li>
<li>All of the usage notes for <strong>statvfs()</strong> apply to <strong>
statvfs64()</strong> and <strong>QlgStatvfs64()</strong>. See <a href=
"statvfs.htm#HDRSTVFUSG">Usage Notes</a> in the <strong>statvfs()</strong>
API.</li>
</ol>
<br>
<hr>
API introduced: V4R4
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>