Loading cmds/installd/tests/installd_cache_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ static int64_t size(const char* path) { static int64_t free() { struct statvfs buf; if (!statvfs("/data/local/tmp", &buf)) { return buf.f_bavail * buf.f_bsize; return buf.f_bavail * buf.f_frsize; } else { PLOG(ERROR) << "Failed to statvfs"; return -1; Loading cmds/installd/utils.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading
cmds/installd/tests/installd_cache_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ static int64_t size(const char* path) { static int64_t free() { struct statvfs buf; if (!statvfs("/data/local/tmp", &buf)) { return buf.f_bavail * buf.f_bsize; return buf.f_bavail * buf.f_frsize; } else { PLOG(ERROR) << "Failed to statvfs"; return -1; Loading
cmds/installd/utils.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -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; Loading