summaryrefslogtreecommitdiff
path: root/lib/ohai/mixin
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2016-02-01 19:33:04 -0800
committerTim Smith <tsmith84@gmail.com>2016-02-01 19:33:04 -0800
commit67d7d03e2085e56decb1855d3a2d1ba0c76aa83d (patch)
tree9dfe4f01862ed8722b497652584ab34b17871c69 /lib/ohai/mixin
parent5d619d3f941e551d4cd7dd1aa1bd5d137ada8a44 (diff)
downloadohai-67d7d03e2085e56decb1855d3a2d1ba0c76aa83d.tar.gz
Reorder dmi decoding of Microsoft values
Start with the most likely value to avoid checking for virtualpc first each time
Diffstat (limited to 'lib/ohai/mixin')
-rw-r--r--lib/ohai/mixin/dmi_decode.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/mixin/dmi_decode.rb b/lib/ohai/mixin/dmi_decode.rb
index 9f39b910..9268f955 100644
--- a/lib/ohai/mixin/dmi_decode.rb
+++ b/lib/ohai/mixin/dmi_decode.rb
@@ -22,10 +22,10 @@ module ::Ohai::Mixin::DmiDecode
case line
when /Manufacturer: Microsoft/
if dmi_data =~ /Product Name: Virtual Machine/
- if dmi_data =~ /Version: (VS2005R2|6.0)/
- return 'virtualpc'
- elsif dmi_data =~ /Version: (7.0|Hyper-V)/
+ if dmi_data =~ /Version: (7.0|Hyper-V)/
return 'hyperv'
+ elsif dmi_data =~ /Version: (VS2005R2|6.0)/
+ return 'virtualpc'
elsif dmi_data =~ /Version: 5.0/
return 'virtualserver'
end