diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index a3969d610efc7..fc3193f8f4d89 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -29,6 +29,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [C# 14 overload resolution with span parameters](core-libraries/10.0/csharp-overload-resolution.md) | Behavioral change | Preview 1 | | [Consistent shift behavior in generic math](core-libraries/10.0/generic-math.md) | Behavioral change | Preview 1 | | [Default trace context propagator updated to W3C standard](core-libraries/10.0/default-trace-context-propagator.md) | Behavioral change | Preview 4 | +| [DriveInfo.DriveFormat returns Linux filesystem types](core-libraries/10.0/driveinfo-driveformat-linux.md) | Behavioral change | Preview 6 | | [LDAP DirectoryControl parsing is now more stringent](core-libraries/10.0/ldap-directorycontrol-parsing.md) | Behavioral change | Preview 1 | | [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 | | [.NET runtime no longer provides default SIGTERM signal handler](core-libraries/10.0/sigterm-signal-handler.md) | Behavioral change | Preview 5 | diff --git a/docs/core/compatibility/core-libraries/10.0/driveinfo-driveformat-linux.md b/docs/core/compatibility/core-libraries/10.0/driveinfo-driveformat-linux.md new file mode 100644 index 0000000000000..fa4d16fd5f6b3 --- /dev/null +++ b/docs/core/compatibility/core-libraries/10.0/driveinfo-driveformat-linux.md @@ -0,0 +1,40 @@ +--- +title: "Breaking change: DriveInfo.DriveFormat returns Linux filesystem types" +description: Learn about the .NET 10 breaking change in core .NET libraries where DriveInfo.DriveFormat on Linux systems returns Linux kernel filesystem type strings instead of mapped magic constants. +ms.date: 06/24/2025 +--- +# DriveInfo.DriveFormat returns Linux filesystem types + +On Linux systems, now returns Linux kernel filesystem type strings. These strings represent a more granular representation of the filesystem type than the previous implementation. For example, it's now possible to distinguish between `ext3` and `ext4`. + +## Previous behavior + +Previously, .NET returned a string representation by mapping magic constants to strings. Because several different filesystem types use the same magic constants, it wasn't possible to distinguish between them. + +For cgroup file systems, `DriveFormat` returned `cgroupfs`/`cgroup2fs`. For the SELinux filesystem, the value was `selinux`. + +## New behavior + +Starting in .NET 10, .NET returns the string representation used by the Linux kernel for the filesystem type. + +For cgroup file systems, `DriveFormat` returns `cgroup`/`cgroup2`. For the SELinux filesystem, the value is `selinuxfs`. + +## Version introduced + +.NET 10 Preview 6 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +Provide more granular filesystem type information. + +## Recommended action + +Check and update usages of to include the Linux filesystem type strings. On a Linux system, you can read the type strings of the drives from the `/proc/self/mountinfo` file. On each line, the filesystem type string is the first field after the `-` separator. + +## Affected APIs + +- diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index bd8dd49dadfdc..43f2e4c116a87 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -24,6 +24,8 @@ items: href: core-libraries/10.0/generic-math.md - name: Default trace context propagator updated to W3C Standard href: core-libraries/10.0/default-trace-context-propagator.md + - name: DriveInfo.DriveFormat returns Linux filesystem types + href: core-libraries/10.0/driveinfo-driveformat-linux.md - name: LDAP DirectoryControl parsing is now more stringent href: core-libraries/10.0/ldap-directorycontrol-parsing.md - name: MacCatalyst version normalization