172 lines
5.6 KiB
HTML
172 lines
5.6 KiB
HTML
<!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>QlgStatvfs64()--Get File System Information (64-Bit enabled and using
|
|
NLS-enabled path name)</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 -->
|
|
<!-- Change History: -->
|
|
<!-- ?? YVONNE Creation date, V5R1 -->
|
|
<!-- 0206?? JET html cleanup -->
|
|
<!-- 041026 JTROUS Fix example so it works, V5R4 -->
|
|
<!-- 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>QlgStatvfs64()--Get File System Information (64-Bit enabled and using
|
|
NLS-enabled path name)</h2>
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
Syntax<br>
|
|
|
|
|
|
<pre>
|
|
#include <sys/statvfs.h>
|
|
|
|
int QlgStatvfs64(Qlg_Path_Name_T <em>*path</em>,
|
|
struct statvfs64 <em>*buf</em>
|
|
</pre>
|
|
|
|
Service Program Name: QP0LLIB1<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Conditional; see Usage Notes for <a href="statvfs.htm">statvfs()</a>.<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The <strong>QlgStatvfs64()</strong> function, like the <strong>
|
|
statvfs64()</strong> function, gets status information about the file system
|
|
that contains the file named by the <em>path</em> argument. The difference is
|
|
that the <strong>QlgStatvfs64()</strong> function takes a pointer to a
|
|
Qlg_Path_Name_T structure, while <strong>statvfs64()</strong> takes a pointer
|
|
to a character string.</p>
|
|
|
|
<p>Limited information on the <em>path</em> parameter is provided here. For
|
|
more information on the <em>path</em> parameter and for a discussion of other
|
|
parameters, authorities required, return values, and related information, 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 a Qlg_Path_Name_T structure that contains a path name
|
|
or a pointer to a path name of the file from which file system information is
|
|
required. For more information on the Qlg_Path_Name_T structure, see <a href=
|
|
"../apiref/pns.htm">Path name format</a>.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Related Information</h3>
|
|
|
|
<ul>
|
|
<li><a href="statvfs.htm">statvfs()</a>--Get File System Information<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="statvf64.htm">statvfs64()</a>--Get File System Information (64-Bit
|
|
Enabled)</li>
|
|
</ul>
|
|
|
|
<br>
|
|
<h3>Example</h3>
|
|
|
|
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
|
|
for information pertaining to code examples.</p>
|
|
|
|
<p>The following example gets information about a file system.</p>
|
|
|
|
<pre>
|
|
#include <sys/statvfs.h>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
|
|
main() {
|
|
|
|
struct statvfs info;
|
|
#define mypath "/"
|
|
|
|
const char US_const[3]= "US";
|
|
const char Language_const[4]="ENU";
|
|
typedef struct pnstruct
|
|
{
|
|
Qlg_Path_Name_T qlg_struct;
|
|
char pn[100];
|
|
/* This array size must be >= the length */
|
|
/* of the path name or must be a pointer */
|
|
/* to the path name. */
|
|
};
|
|
struct pnstruct path;
|
|
|
|
/***************************************************************/
|
|
/* Initialize Qlg_Path_Name_T parameters */
|
|
/***************************************************************/
|
|
memset((void*)&path, 0x00, sizeof(struct pnstruct));
|
|
path.qlg_struct.CCSID = 37;
|
|
memcpy(path.qlg_struct.Country_ID,US_const,2);
|
|
memcpy(path.qlg_struct.Language_ID,Language_const,3);
|
|
path.qlg_struct.Path_Type = QLG_CHAR_SINGLE;
|
|
path.qlg_struct.Path_Length = sizeof(mypath)-1;
|
|
path.qlg_struct.Path_Name_Delimiter[0] = '/';
|
|
<img src="delta.gif" alt="Start of change">
|
|
memcpy(path.pn,mypath,sizeof(mypath)-1);
|
|
<img src="deltaend.gif" alt="End of change">
|
|
|
|
if (-1 == (QlgStatvfs64((Qlg_Path_Name_T *)&path,
|
|
(struct statvfs64 *)&info)))
|
|
{
|
|
perror("QlgStatvfs64() error");
|
|
}
|
|
else
|
|
{
|
|
puts("QlgStatvfs64() returned the following information");
|
|
puts("about the Root ('/') file system:");
|
|
printf(" f_bsize : %u\n", info.f_bsize);
|
|
<img src="delta.gif" alt="Start of change">
|
|
printf(" f_blocks : %llu\n", info.f_blocks);
|
|
printf(" f_bfree : %llu\n", info.f_bfree);
|
|
<img src="deltaend.gif" alt="End of change">
|
|
printf(" f_files : %u\n", info.f_files);
|
|
printf(" f_ffree : %u\n", info.f_ffree);
|
|
printf(" f_fsid : %u\n", info.f_fsid);
|
|
printf(" f_flag : %X\n", info.f_flag);
|
|
printf(" f_namemax : %u\n", info.f_namemax);
|
|
printf(" f_pathmax : %u\n", info.f_pathmax);
|
|
printf(" f_basetype : %s\n", info.f_basetype);
|
|
}
|
|
}
|
|
</pre>
|
|
|
|
<hr>
|
|
API introduced: V5R1
|
|
|
|
<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>
|
|
|