Skip to content

Commit

Permalink
yml 16
Browse files Browse the repository at this point in the history
  • Loading branch information
iadgovuser29 committed Jan 11, 2025
1 parent c9aecf2 commit 12cfabf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions dotnet/ComponentClassRegistry/Smbios/src/Smbios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Smbios {
public class Smbios {
public static readonly string WindowsQueryScope = @"root\\WMI";
public static readonly string WindowsQueryScope = $"root\\WMI";
public static readonly string WindowsQueryString = "SELECT * FROM MSSMBios_RawSMBiosTables";
public static readonly string LinuxPathEntryTable = "/sys/firmware/dmi/tables/smbios_entry_point";
public static readonly string LinuxPathStructures = "/sys/firmware/dmi/tables/DMI";
Expand Down Expand Up @@ -167,8 +167,7 @@ private static void GetSmbiosWindows(out int majorVersion, out int minorVersion,
}

ManagementObjectCollection collection;
using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\WMI", "SELECT * FROM MSSMBios_RawSMBiosTables")) {
//using (ManagementObjectSearcher searcher = new(WindowsQueryScope, WindowsQueryString)) {
using (ManagementObjectSearcher searcher = new(WindowsQueryScope, WindowsQueryString)) {
collection = searcher.Get();
}

Expand Down
6 changes: 1 addition & 5 deletions dotnet/ComponentClassRegistry/SmbiosCli/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
namespace SmbiosCli;
public class SmbiosCli {
public static int Main(string[] args) {
int returnCode = (int)ClientExitCodes.SUCCESS;

Version? version = Assembly.GetExecutingAssembly().GetName().Version;

if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
// Linux requires sudo
int result = CliOptions.IsUserPrivileged();
Expand Down Expand Up @@ -39,6 +35,6 @@ public static int Main(string[] args) {
Console.WriteLine(plugin.ManifestV3.ToString());
}

return returnCode;
return (int)ClientExitCodes.SUCCESS;
}
}

0 comments on commit 12cfabf

Please sign in to comment.