[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stat vs. "-"
From: |
Eric Blake |
Subject: |
Re: stat vs. "-" |
Date: |
Tue, 29 Sep 2009 07:02:44 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 9/29/2009 6:44 AM:
> stat has two modes of operation: the default is to interpret each
> argument as a file on which to call stat or lstat.
> Then there's the --file-system (-f) option.
>
> The "-" == stdin approach makes sense for the first case.
> Since I couldn't think of a use case for the second,
> I was debating to implement it there regardless,
> for the sake of consistency. Otherwise, I'd have to
> document that it works only *without* -f.
But how would you make it work *with* -f? You don't know the path of the
file used to create stdin (and in the case of a pipe, there is no path),
so what would you pass to statvfs? I don't see any option other than to
go with documenting that -f and - do not work together; and we should make
attempts to mix them fail with an error.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrCBXQACgkQ84KuGfSFAYCbbQCeKyEgTeEFxvEKunG8ym81CzUm
BEcAoJrOZnNTzhNyKtStgytphS2FJOlg
=XTbm
-----END PGP SIGNATURE-----