aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-08-06 15:06:02 +0200
committerLukas Larsson <[email protected]>2014-08-06 15:06:02 +0200
commite6fbeb4f03e18bbc6d4a62b0195e0c79021c41a6 (patch)
tree50bfc011e7e1d52cefaf77c529a77f84322364fa
parent62081266545df8f5eda8e2043f33055cfe575126 (diff)
downloadotp-e6fbeb4f03e18bbc6d4a62b0195e0c79021c41a6.tar.gz
otp-e6fbeb4f03e18bbc6d4a62b0195e0c79021c41a6.tar.bz2
otp-e6fbeb4f03e18bbc6d4a62b0195e0c79021c41a6.zip
os_mon: Ignore posix_only on windows and solaris
-rw-r--r--lib/os_mon/doc/src/disksup.xml3
-rw-r--r--lib/os_mon/src/disksup.erl8
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/os_mon/doc/src/disksup.xml b/lib/os_mon/doc/src/disksup.xml
index c8566d0126..0e76178edb 100644
--- a/lib/os_mon/doc/src/disksup.xml
+++ b/lib/os_mon/doc/src/disksup.xml
@@ -81,7 +81,8 @@
necessary on embedded systems with stripped-down versions
of Unix tools like <c>df</c>. The returned disk data and alarms
can be different when using this option.</p>
- <p>The parameter is ignored on Windows.</p>
+ <p>The parameter is ignored on platforms that are known to not be
+ posix compatible (Windows and SunOS).</p>
</item>
</taglist>
<p>See <seealso marker="kernel:config">config(4)</seealso> for
diff --git a/lib/os_mon/src/disksup.erl b/lib/os_mon/src/disksup.erl
index 3fd80f2365..af5bcc6fe8 100644
--- a/lib/os_mon/src/disksup.erl
+++ b/lib/os_mon/src/disksup.erl
@@ -211,14 +211,14 @@ format_status(_Opt, [_PDict, #state{os = OS, threshold = Threshold,
get_os(PosixOnly) ->
case os:type() of
- {unix, _} when PosixOnly ->
- {unix, posix};
{unix, sunos} ->
- case os:version() of
+ case os:version() of
{5,_,_} -> {unix, solaris};
{4,_,_} -> {unix, sunos4};
V -> exit({unknown_os_version, V})
- end;
+ end;
+ {unix, _} when PosixOnly ->
+ {unix, posix};
{unix, irix64} -> {unix, irix};
OS ->
OS