coreutils
[Top][All Lists]
Advanced

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

Re: df --output


From: Bernhard Voelker
Subject: Re: df --output
Date: Sun, 30 Sep 2012 18:43:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0

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

Attachment: df-output.patch2.bz2
Description: application/bzip


reply via email to

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