Title: [270013] trunk/Source/WTF
- Revision
- 270013
- Author
- [email protected]
- Date
- 2020-11-18 20:00:18 -0800 (Wed, 18 Nov 2020)
Log Message
[WTF] Fix a condition to check if statvfs() succeeds in getVolumeFreeSpace()
https://bugs.webkit.org/show_bug.cgi?id=219138
Reviewed by Alexey Proskuryakov.
statvfs() returns Zero on success but getVolumeFreeSpace() treats a non Zero value
as a succes case. The condition is oppsite to the spec of statvfs().
* wtf/posix/FileSystemPOSIX.cpp:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (270012 => 270013)
--- trunk/Source/WTF/ChangeLog 2020-11-19 03:59:42 UTC (rev 270012)
+++ trunk/Source/WTF/ChangeLog 2020-11-19 04:00:18 UTC (rev 270013)
@@ -1,3 +1,15 @@
+2020-11-18 Yousuke Kimoto <[email protected]>
+
+ [WTF] Fix a condition to check if statvfs() succeeds in getVolumeFreeSpace()
+ https://bugs.webkit.org/show_bug.cgi?id=219138
+
+ Reviewed by Alexey Proskuryakov.
+
+ statvfs() returns Zero on success but getVolumeFreeSpace() treats a non Zero value
+ as a succes case. The condition is oppsite to the spec of statvfs().
+
+ * wtf/posix/FileSystemPOSIX.cpp:
+
2020-11-17 Yusuke Suzuki <[email protected]>
[JSC] Improve Wasm binary test coverage
Modified: trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp (270012 => 270013)
--- trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp 2020-11-19 03:59:42 UTC (rev 270012)
+++ trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp 2020-11-19 04:00:18 UTC (rev 270013)
@@ -435,7 +435,7 @@
bool getVolumeFreeSpace(const String& path, uint64_t& freeSpace)
{
struct statvfs fileSystemStat;
- if (statvfs(fileSystemRepresentation(path).data(), &fileSystemStat)) {
+ if (!statvfs(fileSystemRepresentation(path).data(), &fileSystemStat)) {
freeSpace = fileSystemStat.f_bavail * fileSystemStat.f_frsize;
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes