Project

General

Profile

Actions

Submit #2600

closed

[PATCH] df -hi prints inodes count "human-readable" and add -T option

Added by rolinh over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
10/24/2013
Due date:
% Done:

0%

Estimated time:

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
/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


Files

Actions #1

Updated by rolinh over 10 years ago

  • File deleted (0001-df-hi-prints-inodes-count-human-readable.patch)
Actions #3

Updated by swildner over 10 years ago

  • Assignee set to swildner

grab

Actions #4

Updated by rolinh over 10 years ago

Add one more patch which adds -T option to df(1).
It has been adapted from FreeBSD df(1).

Actions #5

Updated by rolinh over 10 years ago

Added a small patch which fixes a memory leak in df(1).

Actions #6

Updated by swildner over 10 years ago

  • Status changed from New to Closed

Thanks, all pushed.

Actions

Also available in: Atom PDF