<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: statvfs systemcall in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213472#M91749</link>
    <description>&amp;gt;Call statvfs() on an existing file. &lt;BR /&gt;&lt;BR /&gt;This looks like an exam or homework question.  This forum is not for those questions.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;the logic which i used is with &amp;amp; operator.&lt;BR /&gt;&lt;BR /&gt;Yes, "&amp;amp;" is the wrong operator.  Perhaps you want to use "&amp;amp;&amp;amp;" for logical AND.  But checking for non-zero doesn't really "verify" anything.</description>
    <pubDate>Tue, 10 Jun 2008 06:08:08 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-06-10T06:08:08Z</dc:date>
    <item>
      <title>statvfs systemcall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213471#M91748</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Call statvfs() on an existing file. Check file system block and inode counts. Check file system ID.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Solution:&lt;BR /&gt;=========&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#define ExistingFile "/shwetha/readme.htm"&lt;BR /&gt;&lt;BR /&gt;        strcpy(DirectoryName,ExistingFile);&lt;BR /&gt; fd = statvfs(DirectoryName,&amp;amp;buf);&lt;BR /&gt;   perror("1.Systemcall statvfs failed on ExistingFile\n");&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;   fprintf (stdout,"Systemcall statvfs Success on ExistingFile\n");&lt;BR /&gt;   if(buf.f_blocks &amp;amp; buf.f_files &amp;amp; buf.f_fsid) {&lt;BR /&gt;      fprintf (stdout, "successfully verified the the file system block, inode c&lt;BR /&gt;ount and file system ID \n");&lt;BR /&gt;   }&lt;BR /&gt;   else {&lt;BR /&gt;      perror ("Failed to verify the the file system block, inode count and file&lt;BR /&gt;system ID\n");&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The testcase for checking the file system block , inode counts,file system ID the logic which i used is with &amp;amp; operator.&lt;BR /&gt;i think this logic is wrong..&lt;BR /&gt;Please let me know how to do this..&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance,&lt;BR /&gt;shwetha&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Jun 2008 04:41:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213471#M91748</guid>
      <dc:creator>sodani</dc:creator>
      <dc:date>2008-06-10T04:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: statvfs systemcall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213472#M91749</link>
      <description>&amp;gt;Call statvfs() on an existing file. &lt;BR /&gt;&lt;BR /&gt;This looks like an exam or homework question.  This forum is not for those questions.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;the logic which i used is with &amp;amp; operator.&lt;BR /&gt;&lt;BR /&gt;Yes, "&amp;amp;" is the wrong operator.  Perhaps you want to use "&amp;amp;&amp;amp;" for logical AND.  But checking for non-zero doesn't really "verify" anything.</description>
      <pubDate>Tue, 10 Jun 2008 06:08:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213472#M91749</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-10T06:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: statvfs systemcall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213473#M91750</link>
      <description>HI:&lt;BR /&gt;&lt;BR /&gt;As Dennis noted, checking a non-zero return status doesn't provide a great amount of information.  You would be better to use 'strerror()' and 'errno' to be able to relate errors to those documented in the manpages for 'statvfs()' :&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.docs.hp.com/en/B3921-60631/statvfs.2.html" target="_blank"&gt;http://www.docs.hp.com/en/B3921-60631/statvfs.2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 10 Jun 2008 10:49:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213473#M91750</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-10T10:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: statvfs systemcall</title>
      <link>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213474#M91751</link>
      <description>&amp;gt;JRF: checking a non-zero return status doesn't provide a great amount of information&lt;BR /&gt;&lt;BR /&gt;I wasn't talking about the return status since that wasn't in the above fragment.  (A bug)&lt;BR /&gt;I was pointing out this if:&lt;BR /&gt;if(buf.f_blocks &amp;amp; buf.f_files &amp;amp; buf.f_fsid) {</description>
      <pubDate>Tue, 10 Jun 2008 19:05:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/statvfs-systemcall/m-p/4213474#M91751</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-10T19:05:19Z</dc:date>
    </item>
  </channel>
</rss>

