diff options
Diffstat (limited to 'cmds/installd/utils.cpp')
| -rw-r--r-- | cmds/installd/utils.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp index fbe6edf712..943df0fca9 100644 --- a/cmds/installd/utils.cpp +++ b/cmds/installd/utils.cpp @@ -629,11 +629,10 @@ int copy_dir_files(const char *srcname, return res; } -int64_t data_disk_free(const std::string& data_path) -{ +int64_t data_disk_free(const std::string& data_path) { struct statvfs sfs; if (statvfs(data_path.c_str(), &sfs) == 0) { - return sfs.f_bavail * sfs.f_bsize; + return sfs.f_bavail * sfs.f_frsize; } else { PLOG(ERROR) << "Couldn't statvfs " << data_path; return -1; |