Xueming Shen wrote:
:
The fix itself looks OK.
2 random thoughts
(1)I see lots of
sprops.os_name = "Windows NT (unknown)";
It might be better to simply initialize the sprops.os_name to
"Windows NT (unknown)" at
the very beginning of the nt block and then depends on the version
number to see if we have
a better guess.
(2)We have been doing the same exercise every time MS released a new
os, it might be the
time to extract this out to a "configurable" file and simple do a
lookup based on the platform,
verMajor, verMinor.
It is true that we need to touch this code whenever a new edition of
Windows comes along. As it runs at startup I would be hesitant to
introduce a lookup file. I agree that the paths in the decision tree
leading to unknown aren't prettry and this could be better.
Unfortunately I don't have cycles for it just now (changing this code is
trivial, but verifying it on each edition is tedious). So are you okay
if this is pushed as is?
-Alan.