Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
7167-snmp-Types-and-specs-for-snmp-versions1-ve...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7167-snmp-Types-and-specs-for-snmp-versions1-versions2-0.patch of Package erlang
From 7bbb502b2d0245340139247d5da2d15c0d9c1bc6 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Thu, 11 Jan 2024 09:57:45 +0100 Subject: [PATCH 27/67] [snmp] Types and specs for snmp:[versions1|versions2]/0 --- lib/snmp/doc/src/snmp.xml | 18 +++++++----------- lib/snmp/src/app/snmp.erl | 11 +++++++++++ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml index a8619a6b4c..9d153601c2 100644 --- a/lib/snmp/doc/src/snmp.xml +++ b/lib/snmp/doc/src/snmp.xml @@ -534,20 +534,16 @@ </func> <func> - <name since="">versions1() -> {ok, Info} | {error, Reason}</name> - <name since="">versions2() -> {ok, Info} | {error, Reason}</name> + <name name="versions1" arity="0" clause_i="1" since=""/> + <name name="versions2" arity="0" clause_i="1" since=""/> <fsummary>Retrieve various system and application info</fsummary> - <type> - <v>Info = [info()]</v> - <v>info() = term()</v> - <v>Reason = term()</v> - </type> <desc> <p>Utility functions used to retrieve some system and - application info.</p> - <p>The difference between the two functions is in how they get - the modules to check. <c>versions1</c> uses the app-file and - <c>versions2</c> uses the function <c>application:get_key</c>.</p> + application info.</p> + + <p>The difference between the two functions is in how they get + the modules to check. <c>versions1</c> uses the app-file and + <c>versions2</c> uses the function <c>application:get_key</c>.</p> <marker id="print_versions"></marker> </desc> diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl index 3bafb8ac8e..374f1cc029 100644 --- a/lib/snmp/src/app/snmp.erl +++ b/lib/snmp/src/app/snmp.erl @@ -677,6 +677,11 @@ key1search(Key, Vals, Def) -> %%----------------------------------------------------------------- +-spec versions1() -> {ok, VersionsInfo} | {error, Reason} when + VersionsInfo :: [VersionInfo], + VersionInfo :: term(), + Reason :: term(). + versions1() -> case ms1() of {ok, Mods} -> @@ -685,6 +690,12 @@ versions1() -> Error end. + +-spec versions2() -> {ok, VersionsInfo} | {error, Reason} when + VersionsInfo :: [VersionInfo], + VersionInfo :: term(), + Reason :: term(). + versions2() -> case ms2() of {ok, Mods} -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor