From b3929cdc4479170842d36a7f2ba757ff052e098b Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Fri, 7 Oct 2011 13:38:40 +0200 Subject: [compiler] Improve version info printout. OTP-9618 --- lib/snmp/doc/src/notes.xml | 45 +++++++++++++++++++++++++++++++++++++++++ lib/snmp/src/app/snmp.appup.src | 8 ++++++++ lib/snmp/src/compile/snmpc.src | 19 ++++++++++++++++- lib/snmp/vsn.mk | 2 +- 4 files changed, 72 insertions(+), 2 deletions(-) diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 9e1a060dee..25b8ff74fd 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -32,6 +32,51 @@ notes.xml +
+ SNMP Development Toolkit 4.21.2 +

Version 4.21.2 supports code replacement in runtime from/to + version 4.21.1, 4.21, 4.20.1, 4.20 and 4.19.

+ +
+ Improvements and new features + + + +

[compiler] Improve version info printout.

+

Own Id: OTP-9618

+
+ +
+ +
+ +
+ Fixed Bugs and Malfunctions +

-

+ + +
+ + +
+ Incompatibilities +

-

+
+ +
+ +
SNMP Development Toolkit 4.21.1

Version 4.21.1 supports code replacement in runtime from/to diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index 0b6ea93231..e311377b2f 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -22,6 +22,10 @@ %% ----- U p g r a d e ------------------------------------------------------- [ + {"4.21.1", + [ + ] + }, {"4.21", [ {load_module, snmp_target_mib, soft_purge, soft_purge, []} @@ -115,6 +119,10 @@ %% ------D o w n g r a d e --------------------------------------------------- [ + {"4.21.1", + [ + ] + }, {"4.21", [ {load_module, snmp_target_mib, soft_purge, soft_purge, []} diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src index f993335b89..8760ce14b5 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. + diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index c95e0a22d1..0819ab9b36 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -17,6 +17,6 @@ # # %CopyrightEnd% -SNMP_VSN = 4.21.1 +SNMP_VSN = 4.21.2 PRE_VSN = APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)" -- cgit v1.2.3 From 156b2ed537d26205fb152cea16347cd8b683e851 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 5 Oct 2011 16:47:21 +0200 Subject: snmpc: fix --warnings/--W option parsing --- lib/snmp/src/compile/snmpc.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src index f993335b89..3d8015f0cd 100644 --- a/lib/snmp/src/compile/snmpc.src +++ b/lib/snmp/src/compile/snmpc.src @@ -234,7 +234,7 @@ process_args(["--verbosity", Verbosity0|Args], #state{verbosity = V} = State) process_args(["--verbosity"|_Args], #state{verbosity = V}) when (V =/= undefined) -> e(lists:flatten(io_lib:format("Verbosity already set to ~w", [V]))); -process_args(["--w"|Args], State) -> +process_args(["--W"|Args], State) -> process_args(Args, State#state{warnings = true}); process_args(["--warnings"|Args], State) -> process_args(Args, State#state{warnings = true}); -- cgit v1.2.3 From a9d61419d053c6e2cd03114554534d2514950795 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 16 Nov 2011 12:41:11 +0100 Subject: New version. Also updated dependency for snmpc. OTP-9618 --- lib/snmp/src/compile/depend.mk | 2 +- lib/snmp/vsn.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/vsn.mk b/lib/snmp/vsn.mk index 0819ab9b36..25e3a9470b 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -17,6 +17,6 @@ # # %CopyrightEnd% -SNMP_VSN = 4.21.2 +SNMP_VSN = 4.21.3 PRE_VSN = APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)" -- cgit v1.2.3 From ac251265b6c43c5128017ba3b4cad49ad7c432c1 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 16 Nov 2011 16:14:44 +0100 Subject: Added new entry because of the version. OTP-9618 --- lib/snmp/src/app/snmp.appup.src | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index e311377b2f..fbea8cb71f 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -22,6 +22,10 @@ %% ----- U p g r a d e ------------------------------------------------------- [ + {"4.21.2", + [ + ] + }, {"4.21.1", [ ] @@ -119,6 +123,10 @@ %% ------D o w n g r a d e --------------------------------------------------- [ + {"4.21.2", + [ + ] + }, {"4.21.1", [ ] -- cgit v1.2.3