From 61ebe669e754b502b3b456a52d147935ed8f6267 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 16 Jun 2005 21:58:28 +0000 Subject: [PATCH] add vendorName, make all os.name the same values we use elsewhere --- bindings/java/src/net/hyperic/sigar/OperatingSystem.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bindings/java/src/net/hyperic/sigar/OperatingSystem.java b/bindings/java/src/net/hyperic/sigar/OperatingSystem.java index 5f133c1d..fe76397c 100644 --- a/bindings/java/src/net/hyperic/sigar/OperatingSystem.java +++ b/bindings/java/src/net/hyperic/sigar/OperatingSystem.java @@ -20,6 +20,7 @@ public class OperatingSystem { private String patchLevel; private String vendor; private String vendorVersion; + private String vendorName; private String dataModel; private String cpuEndian; @@ -31,6 +32,7 @@ public class OperatingSystem { OperatingSystem os = new OperatingSystem(); Properties props = System.getProperties(); os.name = props.getProperty("os.name"); + os.vendorName = os.name; os.version = props.getProperty("os.version"); os.arch = props.getProperty("os.arch"); os.patchLevel = props.getProperty("sun.os.patch.level"); @@ -64,6 +66,7 @@ public class OperatingSystem { os.name = "Solaris"; } else if (os.name.equals("HP-UX")) { + os.name = "HPUX"; os.vendor = "Hewlett-Packard"; if (os.version.indexOf(".11.") != -1) { os.vendorVersion = "11"; @@ -77,6 +80,7 @@ public class OperatingSystem { os.vendor = "IBM"; } else if (os.name.equals("Mac OS X")) { + os.name = "Darwin"; os.vendor = "Apple"; } else if (os.name.equals("FreeBSD")) { @@ -120,6 +124,10 @@ public class OperatingSystem { return this.vendorVersion; } + public String getVendorName() { + return this.vendorName; + } + public String getDataModel() { return this.dataModel; } @@ -252,6 +260,7 @@ public class OperatingSystem { System.out.println("arch............." + os.arch); System.out.println("patch level......" + os.patchLevel); System.out.println("vendor..........." + os.vendor); + System.out.println("vendor name......" + os.vendorName); System.out.println("vendor version..." + os.vendorVersion); } }