diff options
author | Micael Karlberg <[email protected]> | 2011-02-23 10:12:35 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-02-23 10:12:35 +0100 |
commit | ec1eba2f8daff87ca84a17e738fc3b9480c42517 (patch) | |
tree | b3738457aeb5146ae4cb656f727ab80afa5cfbfb /lib/snmp/src | |
parent | 1ffc9f43fe3e80428389636a2e9ba5bf101338f2 (diff) | |
download | otp-ec1eba2f8daff87ca84a17e738fc3b9480c42517.tar.gz otp-ec1eba2f8daff87ca84a17e738fc3b9480c42517.tar.bz2 otp-ec1eba2f8daff87ca84a17e738fc3b9480c42517.zip |
Fixed verbosity.
Diffstat (limited to 'lib/snmp/src')
-rw-r--r-- | lib/snmp/src/compile/snmpc.src | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src index f4336a3264..4581339015 100644 --- a/lib/snmp/src/compile/snmpc.src +++ b/lib/snmp/src/compile/snmpc.src @@ -1,6 +1,27 @@ #!/usr/bin/env escript %% -*- erlang -*- %% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +%% SNMP MIB compiler frontend +%% + +-mode(compile). -include_lib("kernel/include/file.hrl"). @@ -25,10 +46,13 @@ relaxed_row_name_assigne_check = false, %% The default verbosity (silence) will be filled in %% during argument processing. - verbosity, - warnings = false + verbosity, + warnings = false }). + +%% ------------------------------------------------------------------------ +%% Valid arguments: %% --o Dir [defaults to "./"] %% --i Dir [defaults to "./"] %% --il Dir @@ -75,7 +99,7 @@ compile(State) -> end. mk_file(#state{mib_file = MIB}) -> - DirName = filename:dirname(MIB), + DirName = filename:dirname(MIB), BaseName = filename:basename(MIB, ".mib"), filename:join(DirName, BaseName). @@ -150,7 +174,7 @@ process_args([], #state{verbosity = Verbosity0, mib_file = MIB} = State) -> process_args([MIB], State) -> case (catch file:read_file_info(MIB)) of {ok, #file_info{type = regular}} -> - {ok, State#state{mib_file = MIB}}; + process_args([], State#state{mib_file = MIB}); {ok, #file_info{type = BadType}} -> e(lists:flatten(io_lib:format("~s not a file: ~w", [MIB, BadType]))); {error, enoent} -> |