aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp')
-rw-r--r--lib/snmp/doc/src/notes.xml19
-rw-r--r--lib/snmp/src/compile/depend.mk2
-rw-r--r--lib/snmp/src/compile/snmpc.src19
3 files changed, 28 insertions, 12 deletions
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 1a4cd3ea5a..fd5a548b16 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -32,27 +32,25 @@
<file>notes.xml</file>
</header>
+
<section>
<title>SNMP Development Toolkit 4.21.3</title>
<p>Version 4.21.3 supports code replacement in runtime from/to
- version 4.21.2, 4.21.1, 4.21, 4.20.1, 4.20 and 4.19. </p>
-
+ version 4.21.2, 4.21.1, 4.21 and 4.20.1. </p>
+
<section>
<title>Improvements and new features</title>
- <p>-</p>
-
<!--
+ <p>-</p>
+-->
+
<list type="bulleted">
<item>
- <p>Bad note store GC timer deactivation.
- Wrong field in the state record was set (timeout instead active). </p>
- <p>Stefan Grundmann</p>
- <p>Own Id: OTP-9690</p>
+ <p>[compiler] Improved version info printout. </p>
+ <p>Own Id: OTP-9618</p>
</item>
</list>
--->
-
</section>
<section>
@@ -74,6 +72,7 @@
</item>
</list>
+
</section>
diff --git a/lib/snmp/src/compile/depend.mk b/lib/snmp/src/compile/depend.mk
index f7084f8bcd..3ee8dc4bec 100644
--- a/lib/snmp/src/compile/depend.mk
+++ b/lib/snmp/src/compile/depend.mk
@@ -44,6 +44,6 @@ $(EBIN)/snmpc_mib_gram.$(EMULATOR): \
../../include/snmp_types.hrl \
snmpc_mib_gram.erl
-$(BIN)/snmpc: snmpc.src
+$(BIN)/snmpc: snmpc.src ../../vsn.mk
$(PERL) -p -e 's?%VSN%?$(VSN)? ' < $< > $@
chmod 755 $@
diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src
index b528bdde95..868e0929b4 100644
--- a/lib/snmp/src/compile/snmpc.src
+++ b/lib/snmp/src/compile/snmpc.src
@@ -221,7 +221,10 @@ process_args([], #state{verbosity = Verbosity0, file = MIB} = State) ->
process_args(["--help"|_Args], _State) ->
ok;
process_args(["--version"|_Args], #state{version = Version, mfv = MFV} = _State) ->
- {ok, lists:flatten(io_lib:format("snmpc ~s (~s)", [Version, MFV]))};
+ OtpVersion = otp_release(),
+ {ok, lists:flatten(
+ io_lib:format("snmpc ~s [Mib format version ~s] (OTP ~s)",
+ [Version, MFV, OtpVersion]))};
process_args(["--verbosity", Verbosity0|Args], #state{verbosity = V} = State)
when (V =:= undefined) ->
Verbosity = list_to_atom(Verbosity0),
@@ -398,3 +401,17 @@ usage() ->
e(Reason) ->
throw({error, Reason}).
+
+otp_release() ->
+ system_info(otp_release, string).
+
+system_info(Tag, Type) ->
+ case (catch erlang:system_info(Tag)) of
+ {'EXIT', _} ->
+ "-";
+ Info when is_list(Info) andalso (Type =:= string) ->
+ Info;
+ Info ->
+ lists:flatten(io_lib:format("~w", [Info]))
+ end.
+