bug#7157: df should default to -P if output is not a tty

2010-10-04 Thread Eric Blake
[please keep the list in the loop] On 10/04/2010 08:54 AM, Alain Knaff wrote: One thing that might be possible, however, is to improve df output to adjust column alignment if $COLUMNS Rather than using $COLUMNS (which is not set by all shells...), it might be preferable to do an ioctl(1, TIOCG

bug#7157: df should default to -P if output is not a tty

2010-10-04 Thread Eric Blake
On 10/04/2010 03:44 AM, Alain Knaff wrote: There is an option to prevent this behavior (-P), but apparently the logwatch authors were not aware of it. Understandably, I might say, because if their test cases happen to only have disks with short names, they'll never stumble upon this. Thanks for

Re: [coreutils] [PATCH 1/2] stat: support printing birthtime

2010-10-04 Thread Jim Meyering
Pádraig Brady wrote: > Note the above test fits the pattern of "requiring a delay to pass" > and so can use the retry_delay_ functionality used elsewhere. > The advantage is that the delay is 1s rather than 2 on > 1s resolution file systems like ext3. Oh! Glad you remembered that. I should have,

Re: [coreutils] [PATCH 1/2] stat: support printing birthtime

2010-10-04 Thread Jim Meyering
Eric Blake wrote: ... >> +check_timestamps_updated() >> +{ >> + local delay="$1" > > I guess we're blindly assuming that coreutils testsuite is requiring a > shell that supports 'local'? Yes. So far it hasn't been an issue. $ git grep '^ *local' tests tests/dd/reblock: local delay="$1"

bug#7157: df should default to -P if output is not a tty

2010-10-04 Thread Alain Knaff
Hello, We just had a case where an overfull disk went unnoticed by logwatch. The reason turned out to be its long device name (/dev/mapper /VolGroup00-LogVol00), which caused df to break the line, messing up the column count. Indeed, logwatch looks for the use% in the fifth field, but due to this

Re: [coreutils] [PATCH 1/2] stat: support printing birthtime

2010-10-04 Thread Eric Blake
On 10/04/2010 03:53 AM, Pádraig Brady wrote: +case $(stat --format %x a) in + *.0*) sleep 2;; # worst case file system is FAT + *) # FIXME: sleep .1 would be sufficient if %X showed nanoseconds + sleep 1;; # should be adequate for any system with subsecond resolution +esac + +touch a ||

Re: [coreutils] [PATCHv2] stat: print SELinux context when available

2010-10-04 Thread Pádraig Brady
On 01/10/10 21:41, Jim Meyering wrote: > Eric Blake wrote: >> * src/stat.c (default_format): Include context when present. > > This is a close call, but I think it is justified. > stat's default format should show as much information > as possible, and no one should be parsing it. > SELinux contex

Re: [coreutils] [PATCH 1/2] stat: support printing birthtime

2010-10-04 Thread Pádraig Brady
On 01/10/10 15:34, Eric Blake wrote: > diff --git c/tests/misc/stat-birthtime i/tests/misc/stat-birthtime > new file mode 100755 > index 000..d4f372e > --- /dev/null > +++ i/tests/misc/stat-birthtime > @@ -0,0 +1,46 @@ > +#!/bin/sh > +# ensure that stat attempts birthtime access > + > +# Copyri

Re: [coreutils] [PATCHv2] stat: print SELinux context when available

2010-10-04 Thread Jim Meyering
Pádraig Brady wrote: > On 01/10/10 21:41, Jim Meyering wrote: >> Eric Blake wrote: >>> * src/stat.c (default_format): Include context when present. >> >> This is a close call, but I think it is justified. >> stat's default format should show as much information >> as possible, and no one should be