[ale] bizarre error
Chris Fowler
cfowler at outpostsentinel.com
Mon Apr 15 20:31:33 EDT 2002
comiple this with
gcc -o statfs statfs.c
Run it and display output.
--- Cut Here ----
#include <stdio.h>
#include <unistd.h>
#include <sys/vfs.h>
int
main(int argc, char *argv[])
{
struct statfs buf;
if(argc !=2)
{
fprintf(stderr,"statfs <dir fs is mounted on>\n");
exit(1);
}
if(statfs(argv[1], &buf) == -1)
{
perror("open fs");
exit(1);
}
printf("FS: %s\n", argv[1]);
printf("Optimal Block Size: %ld\n", buf.f_bsize);
printf("Total Blocks in FS: %ld\n", buf.f_blocks);
printf("Free Blocks: %ld\n", buf.f_bfree);
printf("Used Blocks: %ld\n", buf.f_blocks -
buf.f_bfree);
printf("Blocks Avail. to non-root: %ld\n", buf.f_bavail);
printf("Total INODES: %ld\n", buf.f_files);
printf("Free INODES: %ld\n", buf.f_ffree);
printf("Used INODES: %ld\n", buf.f_files -
buf.f_ffree);
return 0;
}
--- Cut Here ---
-----Original Message-----
From: Geoffrey [mailto:esoteric at 3times25.net]
To: ale at ale.org
Sent: Monday, April 15, 2002 8:14 PM
To: Chris Fowler
Subject: Re: [ale] bizarre error
Chris Fowler wrote:
> I should have known taht one. Maybe I've been programming too long.
Nah, some of those items slip by. Afterall, your brain only holds so
much. :) I hope there's not a 'programming too long' window cause I'd
sure would have fallen out of it by now. :)
>
> -----Original Message-----
> From: Geoffrey [mailto:esoteric at 3times25.net]
> Sent: Monday, April 15, 2002 8:01 PM
> To: John Wells
> Cc: Chris Fowler; ale at ale.org
> Subject: Re: [ale] bizarre error
>
>
>
>>--------- Original message --------
>>From: Chris Fowler <cfowler at outpostsentinel.com>
>>To: Geoffrey <esoteric at 3times25.net>, John Wells
>>
> <jb at sourceillustrated.com>
>
>>CC: ale at ale.org
>>Subject: RE: [ale] bizarre error
>>Date: 04-15-02 23:46
>>
>>
>>
>>>I never thought about that one. Is there a way to check?
>>>
>
> df -i
>
>
> --
> Until later: Geoffrey esoteric at 3times25.net
>
> I didn't have to buy my radio from a specific company to listen
> to FM, why doesn't that apply to the Internet (anymore...)?
>
>
>
>
>
--
Until later: Geoffrey esoteric at 3times25.net
I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list