Project

General

Profile

Feature #903

Treat zero size fielsystems as special cases

Added by Robin Hahling over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
04/23/2017
Due date:
% Done:

0%

Estimated time:

Description

There is a contradiction in dfc's output for special filesystems of
zero size.

  1. mount -t tmpfs tmpfs /mnt -o size=0
  2. dfc
    FILESYSTEM USED AVAILABLE TOTAL MOUNTED ON
    tmpfs 100
    0B 0B /mnt

By definition, no data uses no space, so printing 100% is incorrect.
Printing 0% is likewise undesirable, since all the space you had is
indeed already gone. GNU df found a good middle way:

18:20 zap:/ > df /mnt
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 0 0 0 - /mnt

Also available in: Atom PDF