Conversation
|
Tagging subscribers to this area: @dotnet/area-system-io Issue Detailsfixes #61175 context: #61175 (comment)
|
Would it be better to change the |
In a long term yes. Here I wanted to make the change as small as possible to make it easier to review when backporting to 6.0. |
|
Should the type of UnixFileSystemTypes be uint? Would catch if we try to add larger values. |
92d05e5 to
d5d9cb9
Compare
d5d9cb9 to
cb3017e
Compare
…y the new asserts)
| // which got deprecated in macOS 10.6, in favor of statfs | ||
| while ((statfsRes = fstatfs(ToFileDescriptor(fd), &statfsArgs)) == -1 && errno == EINTR) ; | ||
| return statfsRes == -1 ? (int64_t)-1 : (int64_t)statfsArgs.f_type; | ||
| return statfsRes == -1 ? 0 : (uint32_t)statfsArgs.f_type; // disregard the upper bytes #61175 |
There was a problem hiding this comment.
| return statfsRes == -1 ? 0 : (uint32_t)statfsArgs.f_type; // disregard the upper bytes #61175 | |
| return statfsRes == -1 ? 0 : (uint32_t)statfsArgs.f_type; // disregard the upper bytes https://github.com/dotnet/runtime/issues/61175 |
src/libraries/Common/src/Interop/Unix/System.Native/Interop.UnixFileSystemTypes.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Tom Deseyn <[email protected]>
fixes #61175
context: #61175 (comment)
the fix is relatively safe as the maximum know value that we support:
runtime/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UnixFileSystemTypes.cs
Line 38 in 4822e3c
can be represented using 32 bit value