[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
coreutils-4.5.7: df broken on unmounted devices
From: |
Bruno Haible |
Subject: |
coreutils-4.5.7: df broken on unmounted devices |
Date: |
Wed, 19 Feb 2003 22:59:55 +0100 (CET) |
Hi,
This change:
* df now displays a mount point (usually `/') for non-mounted
character-special and block files
is counter-intuitive, because it produces
$ df /dev/hda
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda 2208864 2127604 81260 97% /
$ df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 2208864 2127604 81260 97% /
leaving the user puzzled about which device / corresponds to. It also
violates the spirit of POSIX:2001, which says:
"%s %d %d %d %d%% %s\n", <file system name>, <total space>,
<space used>, <space free>, <percentage used>,
<file system root>
...
<file system name> The name of the file system, in an implementation-
defined format.
<file system root> The directory below which the file system hierarchy
appears.
So it is clearly understood that the first column should be the "name"
of the filesystem whose mount point is listed in the last column.
That's also what the header of the last column ("Mounted on") says, after all.
We already have
$ df /etc/profile
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 2208864 2127604 81260 97% /
Therefore a user (and also shell scripts which use the "df" output) will
expect
$ df /dev/tty
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 2208864 2127604 81260 97% /
instead of
$ df /dev/tty
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/tty 2208864 2127604 81260 97% /
Bruno
- coreutils-4.5.7: df broken on unmounted devices,
Bruno Haible <=