[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] df: new option: --total (-c) to produce grand total (in the
From: |
Kamil Dudka |
Subject: |
Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du) |
Date: |
Tue, 2 Sep 2008 14:57:31 +0200 |
User-agent: |
KMail/1.9.9 |
On Tuesday 02 September 2008 11:52:57 you wrote:
> You'll want to print totals with --inodes (-i), too.
Good point, fixed...
> Please adjust formatting to use spaces before each open parenthesis
Sorry for this detail, I always forget. Note that this is not acceptable for
macro definition with arguments (e.g. LOG_EQ).
> and drop the short-named "-c" option. There is a strong disincentive
> to adding new short-named options: they can conflict with other-vendor
> versions of df.
Well, dropped...
> It'd be nice to add a test to exercise the code
> (with and without -i) and at least check for a final line
> matching /^total.../.
I wrote two test cases. The 1st is dummy and check only /^total.../ line
presence and the 2nd computes the summary itself and compare result with
df --total. The second one requires awk.
> > +#define LOG_EQ(a,b) (((a)&&(b))||(!(a)&&!(b)))
>
> This can be written more simply as !((a) ^ (b))
Replaced with (!(a) == !(b)), thanks James!
> Please split long lines so as not to exceed max length of 80.
Ok, fixed, new patch in attachment...
Kamil
coreutils-df-total.patch
Description: Text Data
- [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Kamil Dudka, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Kamil Dudka, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), James Youngman, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du),
Kamil Dudka <=
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/02
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Kamil Dudka, 2008/09/03
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Andreas Schwab, 2008/09/03
- Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du), Jim Meyering, 2008/09/03