coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df --output


From: Pádraig Brady
Subject: Re: df --output
Date: Mon, 01 Oct 2012 12:20:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 09/30/2012 05:43 PM, Bernhard Voelker wrote:
On 09/29/2012 11:29 PM, Bernhard Voelker wrote:
Here you are (see attached):

[PATCH 20/20] df: print "total" in grand total's target field if no source
[PATCH 19/20] df: cleanup comments regarding double blank after
[PATCH 18/20] df: add a test for the --output option
[PATCH 17/20] df: document the new --output option
[PATCH 16/20] df: plug two minor memory holes detected by valgrind
[PATCH 15/20] df: add new --output option
[PATCH 14/20] df: enhance comment describing history
[PATCH 13/20] df: give posix_format variable a better scope
[PATCH 12/20] df: cleanup header_mode handling regarding --inodes
[PATCH 11/20] df: minor cleanup to improve readability
[PATCH 10/20] df: remove remainder of pre-mixed fields support
[PATCH 09/20] df: add basic support for mixed block and inode fields
[PATCH 08/20] df: print '-' into the target column of the total line
[PATCH 07/20] df: only sum up grand total if required
[PATCH 06/20] df: remove now-obsolescent condition
[PATCH 05/20] df: use enum value for long option --total
[PATCH 04/20] df: apply ambsalign to the last field with
[PATCH 03/20] df: rework internal processing of output columns
[PATCH 02/20] df: rename some displayable fields
[PATCH 01/20] df: move the call of get_header from get_dev to main

The bigger/important changes are in the patches 03, 09, and 15.

Example:

   $ src/df -h --tot --o=target,pcent,ipcent / /home
   Mounted on Use% IUse%
   /           65%   32%
   /home       65%    2%
   total       65%    5%

Have a nice day,
Berny

I have added another patch at the end:

   [PATCH 21/21] df: ensure that the mount list contains a valid
   fstype with --output

   The function read_file_system_list only ensures a valid file
   system type if the calling parameter is true. With the new
   option --output, there is an additional condition needed:
   when the FSTYPE_FIELD is used.

I didn't notice a problem on GNU/Linux, but the documentation of
read_file_system_list() leads to the conclusion that df needs to
pass true also for 'df --o=fstype,...'.

The new, additional condition may also have replaced the one before
     || print_type
because
     || field_data[FSTYPE_FIELD].used
also leads to true with 'df -T'; I just left it there for now.

Have a nice day,
Berny


Thanks for all this Berny.
I've no time to review yet,
but promise to do so next weekend
or early next week.

cheers,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]