SHA256
1
0
forked from pool/coreutils
coreutils/coreutils-df-always-hide-rootfs.patch
Ismail Dönmez f90f497a04 Accepting request 144029 from Base:System
supersedes request 143406:
* mention patch name in changelog,
* fix crash in "df --total" due to bad rootfs hiding

OBS-URL: https://build.opensuse.org/request/show/144029
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=83
2012-12-08 14:51:18 +00:00

15 lines
596 B
Diff

Index: coreutils-8.17/src/df.c
===================================================================
--- coreutils-8.17.orig/src/df.c
+++ coreutils-8.17/src/df.c
@@ -474,6 +474,9 @@ get_dev (char const *disk, char const *m
if (!selected_fstype (fstype) || excluded_fstype (fstype))
return;
+ if (fstype && !show_all_fs && (STRNCMP_LIT (fstype, "rootfs") == 0))
+ return;
+
/* If MOUNT_POINT is NULL, then the file system is not mounted, and this
program reports on the file system that the special file is on.
It would be better to report on the unmounted file system,