As per man page, df should show the filesystem if you pass the device node of a mounted filesystem, but otherwise should fallback to the filesystem that the device node is located in. Currently just calls a show_dev with lots of zero fields, effectively killing the filesystem field. Simple fix is to call show_point along this failure path. Many different possible fixes, all about equally elegant. One approach (fairly small patch) is to simply pass show_disk one more param so it's capable of calling show_point itself: --- fileutils-4.0p/src/df.c.jmm Mon May 8 02:42:13 2000 +++ fileutils-4.0p/src/df.c Mon May 8 03:03:21 2000 @@ -433,8 +433,10 @@ /* Identify the directory, if any, that device DISK is mounted on, and show its disk usage. */ +static void show_point (const char *disk, const struct stat *statp); static void -show_disk (const char *disk) +show_disk (const char *disk, const struct stat *statp) { struct mount_entry *me; @@ -445,8 +447,8 @@ me->me_dummy, me->me_remote); return; } - /* No filesystem is mounted on DISK. */ - show_dev (disk, (char *) NULL, (char *) NULL, 0, 0); + /* No filesystem is mounted on DISK, fall back to show_point. */ + show_point (disk, statp); } /* Return the root mountpoint of the filesystem on which FILE exists, in @@ -706,7 +708,7 @@ show_entry (const char *path, const struct stat *statp) { if (S_ISBLK (statp->st_mode) || S_ISCHR (statp->st_mode)) - show_disk (path); + show_disk (path, statp); else show_point (path, statp); }
This is fixed in 4.0x