Skip to content

Commit

Permalink
[RISC-V] Restore IsNotQemuLinux, remove isQemu
Browse files Browse the repository at this point in the history
  • Loading branch information
yurai007 committed Jul 12, 2024
1 parent 4fe6b04 commit 421f18f
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static partial class PlatformDetection

public static bool IsMonoLinuxArm64 => IsMonoRuntime && IsLinux && IsArm64Process;
public static bool IsNotMonoLinuxArm64 => !IsMonoLinuxArm64;
public static bool IsQemuLinux => IsQemu();
public static bool IsNotQemuLinux => !IsQemuLinux;

// OSX family
public static bool IsApplePlatform => IsOSX || IsiOS || IstvOS || IsMacCatalyst;
Expand Down Expand Up @@ -112,6 +112,19 @@ public static bool OpenSslPresentOnSystem
}
}

public static bool IsQemuLinux
{
get
{
if (IsLinux)
{
return Environment.GetEnvironmentVariable("DOTNET_RUNNING_UNDER_QEMU") != null;
}

return false;
}
}

private static Version s_opensslVersion;
private static Version GetOpenSslVersion()
{
Expand Down Expand Up @@ -303,15 +316,6 @@ private static bool IsDistroAndVersionOrHigher(Predicate<string> distroPredicate
return false;
}

private static bool IsQemu()
{
if (IsLinux)
{
return Environment.GetEnvironmentVariable("DOTNET_RUNNING_UNDER_QEMU") != null;
}
return false;
}

private static bool VersionEquivalentTo(int major, int minor, int build, int revision, Version actualVersionId)
{
return (major == -1 || major == actualVersionId.Major)
Expand Down

0 comments on commit 421f18f

Please sign in to comment.