Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
1535-snmp-Types-and-specs-for-snmp-print_versio...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1535-snmp-Types-and-specs-for-snmp-print_version_info-0-1.patch of Package erlang
From 751f6abe954d618679f5fde2c20394d7d0a22fcd Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Wed, 10 Jan 2024 17:03:34 +0100 Subject: [PATCH 15/67] [snmp] Types and specs for snmp:print_version_info/0,1 --- lib/snmp/doc/src/snmp.xml | 12 +++++------- lib/snmp/src/app/snmp.erl | 5 +++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml index e5cb8eb3f8..e6b38bab32 100644 --- a/lib/snmp/doc/src/snmp.xml +++ b/lib/snmp/doc/src/snmp.xml @@ -525,16 +525,14 @@ </func> <func> - <name since="">print_version_info() -> void()</name> - <name since="">print_version_info(Prefix) -> void()</name> + <name name="print_version_info" arity="0" clause_i="1" since=""/> + <name name="print_version_info" arity="1" clause_i="1" since=""/> <fsummary>Formatted print of result of the versions functions</fsummary> - <type> - <v>Prefix = string() | integer()</v> - </type> <desc> <p>Utility function(s) to produce a formatted printout of the versions - info generated by the <c>versions1</c> function</p> - <p>This is the same as doing, e.g.: </p> + info generated by the <c>versions1</c> function</p> + + <p>This is the same as doing, e.g.: </p> <pre> {ok, V} = snmp:versions1(), snmp:print_versions(V). diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl index 812f4208d2..4cbc9405a1 100644 --- a/lib/snmp/src/app/snmp.erl +++ b/lib/snmp/src/app/snmp.erl @@ -440,10 +440,15 @@ format_timestamp({_N1, _N2, N3} = Now) -> %%----------------------------------------------------------------- %% {ok, Vs} = snmp:versions1(), snmp:print_versions(Vs). +-spec print_version_info() -> void(). + print_version_info() -> {ok, Vs} = versions1(), print_versions(Vs). +-spec print_version_info(Prefix) -> void() when + Prefix :: string() | non_neg_integer(). + print_version_info(Prefix) -> {ok, Vs} = versions1(), print_versions(Prefix, Vs). -- 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