Submit #2600
closed[PATCH] df -hi prints inodes count "human-readable" and add -T option
0%
Description
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
@-1:00002 102G 7.9G 95G 8% 562k 0 100% /tmp
/pfs/
/pfs/@-1:00003 102G 7.9G 95G 8% 562k 0 100% /usr
@-1:00004 102G 7.9G 95G 8% 562k 0 100% /home
/pfs/
/pfs/@-1:00005 102G 7.9G 95G 8% 562k 0 100% /usr/obj
@-1:00006 102G 7.9G 95G 8% 562k 0 100% /var/crash
/pfs/
/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
@-1:00002 102G 7.9G 95G 8% 562089 0 100% /tmp
/pfs/
/pfs/@-1:00003 102G 7.9G 95G 8% 562089 0 100% /usr
@-1:00004 102G 7.9G 95G 8% 562089 0 100% /home
/pfs/
/pfs/@-1:00005 102G 7.9G 95G 8% 562089 0 100% /usr/obj
@-1:00006 102G 7.9G 95G 8% 562089 0 100% /var/crash
/pfs/
/pfs/@@-1:00007 102G 7.9G 95G 8% 562089 0 100% /var/tmp
procfs 4.0K 4.0K 0B 100% 29 16103 0% /proc
Files