Bug 91725 - bad handling of DF by KDiskFreeSp
Summary: bad handling of DF by KDiskFreeSp
Status: RESOLVED FIXED
Alias: None
Product: kdf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-20 01:01 UTC by Shie Erlich
Modified: 2013-01-19 23:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shie Erlich 2004-10-20 01:01:50 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    RedHat RPMs
Compiler:          gcc 3.4.2 
OS:                Linux

when calling KDiskFreeSp::findUsageInfo(), i supply the path which i want to test. then KDiskFreeSp::readDF() runs DF -k and parses the resulting data. The point is that it runs 'df -k' instead of running 'df -k path'. this causes 2 things:
1) calling this function for multiple mount points is very inefficient
2) if you have an NFS share mounted, and the connection is bad, or the remote computer is not connected anymore, DF takes a LONG LONG LONG time to finish. when that happens, i don't get the stat info i requested even if i didn't want to know anything about that remote share. 

fix: in KDiskFreeSp::readDF(), change
------- this ---------
(*dfProc) << QString::fromLocal8Bit(DF_COMMAND) << QString::fromLocal8Bit(DF_ARGS);
------- to this ------
(*dfProc) << QString::fromLocal8Bit(DF_COMMAND) << QString::fromLocal8Bit(DF_ARGS) << mountPoint;


thanks!
Comment 1 Christoph Feck 2013-01-19 23:00:35 UTC
Code now uses statvfs().