🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #286

Re: Can I get info about current filesystem by using system calls?

#286
From: Timothy Fredrick
Date: Mon, 03 Aug 1992 22:21
26 lines
1528 bytes
In article <15dctiINNgar@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
>In article <1992Jul31.205759.20928@ncar.ucar.edu> fredrick@acd.acd.ucar.edu (Timothy Fredrick) writes:
>>I am writing a C program and would like to get information about the file
>>system that the user is on when he or she runs the program.  This information
>>might include the name of the physical device (e.g., "/dev/hd1"), how large
>>the disk partition is, how much of the disk partition is used, etc.
>
>struct statfs statbuf;
>...
>statfs(".", &statbuf);
>-- 
>Barry Margolin
>System Manager, Thinking Machines Corp.
>
>barmar@think.com          {uunet,harvard}!think!barmar


Thanks to Berry Margolin -- this worked on local filesystems.  However,
I would like to also get information about automounted filesystems such
as the hostname of the exporter, volume name, etc.  Any ideas?

I am running on an IBM AIX 3.2 system.

Thanks in advance.

--Tim Fredrick (fredrick@acd.ucar.edu)
Technical Details
Message-ID: <1992Aug3.222115.7586@ncar.ucar.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!ncar!acd!fredrick
References: <1992Jul31.205759.20928@ncar.ucar.edu> <15dctiINNgar@early-bird.think.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!ncar!acd!fredrick
From: fredrick@acd.acd.ucar.edu (Timothy Fredrick)
Subject: Re: Can I get info about current filesystem by using system calls?
Message-ID: <1992Aug3.222115.7586@ncar.ucar.edu>
Sender: news@ncar.ucar.edu (USENET Maintenance)
Organization: Ntl Center for Atmospheric Research, Atmospheric Chemistry
References: <1992Jul31.205759.20928@ncar.ucar.edu> <15dctiINNgar@early-bird.think.com>
Date: Mon, 3 Aug 1992 22:21:15 GMT
Lines: 27