Re: finding how much the file system is full, from a C program?
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Mon, 30 Oct 2006 21:36:52 +0000 (UTC)
In article <wmzsGguTDN6N-pn2-IqCl3Qi0Nt0Q@xxxxxxxxxxxxxxxxxxxxxx>,
Herbert Rosenau <os2guy@xxxxxxxxxxxxx> wrote:
On Mon, 30 Oct 2006 07:10:45 UTC, SM Ryan
<wyrmwif@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In ANSI C you can do something like
system("df -k /mnt/mvdg1/vset >/tmp/df-k");
That is not ANSI C. The parameter of system is system dependant and
unportable.
On my system is no directory mnt.
Quibble: ANSI C promises that system() will exist, but not that
there will be any command interpreter, and refuses to itself ascribe
any meaning to the string passed to system(). The result is system
dependant, portable at most to other similar systems -- but it *is*
ANSI C.
FILE *f = fopen("/tmp/dfk","r");
Not ANSI C but system dependant. ANSI C knows nothing about pathes,
directories and so on.
Similar quibble: ANSI C promises the existance of fopen() but
refuses to itself ascribe any meaning to the filename string. ANSI
C refuses to even define something as simple as the interpretation
of the filename "x" in fopen("x","r") . A filename with a / in
it is, as far as ANSI C is concerned, no more and no less portable
than one without. Your claim thus transforms to "any use of fopen()
is not ANSI C but system dependant"; it is true that it is system
dependant, but fopen() itself is still firmly part of ANSI C.
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest
.
- Follow-Ups:
- Re: finding how much the file system is full, from a C program?
- From: Jordan Abel
- Re: finding how much the file system is full, from a C program?
- References:
- finding how much the file system is full, from a C program?
- From: prasadjoshi124
- Re: finding how much the file system is full, from a C program?
- From: SM Ryan
- Re: finding how much the file system is full, from a C program?
- From: Herbert Rosenau
- finding how much the file system is full, from a C program?
- Prev by Date: Re: assembly in future C standard
- Next by Date: Re: compiling problems
- Previous by thread: Re: finding how much the file system is full, from a C program?
- Next by thread: Re: finding how much the file system is full, from a C program?
- Index(es):
Relevant Pages
|
|