MCPcopy Create free account
hub / github.com/ashaduri/gsmartcontrol / check_format_supported

Method check_format_supported

src/applib/smartctl_version_parser.cpp:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57bool SmartctlVersionParser::check_format_supported(SmartctlOutputFormat format, const std::string& version_only)
58{
59 if (auto numeric_version = get_numeric_version(version_only); numeric_version.has_value()) {
60 switch(format) {
61 case SmartctlOutputFormat::Text:
62 return numeric_version.value() >= minimum_req_text_version;
63 case SmartctlOutputFormat::Json:
64 return numeric_version.value() >= minimum_req_json_version;
65 }
66 }
67 return false;
68}
69
70
71

Callers

nothing calls this directly

Calls 2

has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected