Re: statfs(), xforms, and linux

Robert S. Mallozzi (mallors@ips1.msfc.nasa.gov)
Fri, 25 Apr 1997 14:45:55 -0500

To subscribers of the xforms list from "Robert S. Mallozzi" <mallors@ips1.msfc.nasa.gov> :

On 25 Apr, Ivan Powis wrote:
> To subscribers of the xforms list from Ivan Powis
<pczip@chemistry.nottingham.ac.uk> :
>
>>
>> To subscribers of the xforms list from "Robert S. Mallozzi"
<mallors@ips1.msfc.nasa.gov> :
>>
>> Hi guys,
>>
>> After pulling my hair out for a day, I finally isolated a problem
>> on my linux machine. However, I fail to understand why this error
>> occurs. If I use the statfs() function to obtain filesystem
>> [...deleted]
>> if (statfs("/", buf)) {
>
> According to my man pages the second argumant to statfs should be a pointer
> ie
>
> stafs("/",&buf)
>
> --

Ha, when I change the program as follows, everything works. Thanks for
the hint, Ivan

struct statfs buf;

statfs("/", &buf);

printf("%d", buf.f_blocks);

My apologies for posting c questions to the xforms list ;-)
I am still unsure why *buf does not work under linux (works fine on
SGI...).

Also, thanks for the code, Steve.

-bob
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/