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
Updated by rolinh about 11 years ago
- File deleted (
0001-df-hi-prints-inodes-count-human-readable.patch)
Updated by rolinh about 11 years ago
- File 0001-declare-functions-local-to-df-module-as-static.patch 0001-declare-functions-local-to-df-module-as-static.patch added
- File 0002-df-hi-prints-inodes-count-human-readable.patch 0002-df-hi-prints-inodes-count-human-readable.patch added
Split the patch in two distinct patches and updated manual page of df(1) according to the change.
Updated by rolinh about 11 years ago
- File 0003-Add-T-option-to-df-1.patch 0003-Add-T-option-to-df-1.patch added
- Subject changed from [PATCH] df -hi prints inodes count "human-readable" to [PATCH] df -hi prints inodes count "human-readable" and add -T option
Add one more patch which adds -T option to df(1).
It has been adapted from FreeBSD df(1).
Updated by rolinh about 11 years ago
Added a small patch which fixes a memory leak in df(1).