Bug 219138 - [WTF] Fix a condition to check if statvfs() succeeds in getVolumeFreeSpace()
Summary: [WTF] Fix a condition to check if statvfs() succeeds in getVolumeFreeSpace()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yousuke Kimoto
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-18 18:04 PST by Yousuke Kimoto
Modified: 2020-11-18 20:01 PST (History)
5 users (show)

See Also:


Attachments
Patch to fix the condition. (1.43 KB, patch)
2020-11-18 18:11 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuke Kimoto 2020-11-18 18:04:57 PST
statvfs() returns Zero on success, and -1 is returned on error.

But getVolumeFreeSpace() of FileSystemPOSIX.cpp treats a non Zero value as success case. The condition is wrong.
Comment 1 Yousuke Kimoto 2020-11-18 18:11:47 PST
Created attachment 414524 [details]
Patch to fix the condition.
Comment 2 EWS 2020-11-18 20:00:41 PST
Committed r270013: <https://trac.webkit.org/changeset/270013>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 414524 [details].
Comment 3 Radar WebKit Bug Importer 2020-11-18 20:01:46 PST
<rdar://problem/71569072>