Use statvfs instead of statfs

This commit is contained in:
David Sansome 2010-07-29 19:06:27 +00:00
parent 87b8c3ce69
commit af0a9ac79b
1 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@
# include "gpoddevice.h"
#endif
#include <sys/vfs.h>
#include <sys/statvfs.h>
#include <QtDebug>
@ -179,8 +179,8 @@ DeviceKitLister::DeviceData DeviceKitLister::ReadDeviceData(
// Get free space info
if (!ret.device_mount_paths.isEmpty()) {
struct statfs fs_info;
if (statfs(ret.device_mount_paths[0].toLocal8Bit().constData(), &fs_info) == 0) {
struct statvfs fs_info;
if (statvfs(ret.device_mount_paths[0].toLocal8Bit().constData(), &fs_info) == 0) {
ret.free_space = fs_info.f_bavail * fs_info.f_bsize;
}
}