[DragonFlyBSD - Submit #2600] [PATCH] df -hi prints inodes count "human-readable"

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Fri Oct 25 00:06:50 PDT 2013


Issue #2600 has been updated by swildner.

Assignee set to swildner

grab

----------------------------------------
Submit #2600: [PATCH] df -hi prints inodes count "human-readable"
http://bugs.dragonflybsd.org/issues/2600#change-11613

* Author: rolinh
* Status: New
* Priority: Normal
* Assignee: swildner
* Category: 
* Target version: 
----------------------------------------
This patch enables "human-readable" printing of inodes count when df(1)
is called with both -h and -i flags. This is similar to what can be
found on FreeBSD df(1) or GNU df(1).
The code has been adapted from FreeBSD's df(1).

Functions local to the module were also made static to be compliant with
style(9).

Example output:

Now:
% df -hi
Filesystem                           Size   Used  Avail Capacity iused ifree %iused  Mounted on
ROOT                                 102G   7.9G    95G     8%    562k     0  100%   /
devfs                                1.0K   1.0K     0B   100%     668     0  100%   /dev
/dev/serno/VB6cbedbd6-0a1f16ee.s1a   756M   302M   393M    43%     949   96k    1%   /boot
/pfs/@@-1:00001                      102G   7.9G    95G     8%    562k     0  100%   /var
/pfs/@@-1:00002                      102G   7.9G    95G     8%    562k     0  100%   /tmp
/pfs/@@-1:00003                      102G   7.9G    95G     8%    562k     0  100%   /usr
/pfs/@@-1:00004                      102G   7.9G    95G     8%    562k     0  100%   /home
/pfs/@@-1:00005                      102G   7.9G    95G     8%    562k     0  100%   /usr/obj
/pfs/@@-1:00006                      102G   7.9G    95G     8%    562k     0  100%   /var/crash
/pfs/@@-1:00007                      102G   7.9G    95G     8%    562k     0  100%   /var/tmp
procfs                               4.0K   4.0K     0B   100%      29   16k    0%   /proc

Before:
% df -hi
Filesystem                           Size   Used  Avail Capacity iused ifree %iused  Mounted on
ROOT                                 102G   7.9G    95G     8%  562089     0  100%   /
devfs                                1.0K   1.0K     0B   100%     668     0  100%   /dev
/dev/serno/VB6cbedbd6-0a1f16ee.s1a   756M   302M   393M    43%     949 96329    1%   /boot
/pfs/@@-1:00001                      102G   7.9G    95G     8%  562089     0  100%   /var
/pfs/@@-1:00002                      102G   7.9G    95G     8%  562089     0  100%   /tmp
/pfs/@@-1:00003                      102G   7.9G    95G     8%  562089     0  100%   /usr
/pfs/@@-1:00004                      102G   7.9G    95G     8%  562089     0  100%   /home
/pfs/@@-1:00005                      102G   7.9G    95G     8%  562089     0  100%   /usr/obj
/pfs/@@-1:00006                      102G   7.9G    95G     8%  562089     0  100%   /var/crash
/pfs/@@-1:00007                      102G   7.9G    95G     8%  562089     0  100%   /var/tmp
procfs                               4.0K   4.0K     0B   100%      29 16103    0%   /proc


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Submit mailing list