summaryrefslogtreecommitdiff
path: root/hscript/network.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-04 19:37:47 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-04 19:37:47 -0600
commitc4e2d2373bed23f56ab8b96fc028ffb1c5c56001 (patch)
tree9d2dd60abdd5bd3464e0893eea58f380ce404d6a /hscript/network.cc
parentffdfbdbacfdd0648eb25425a019337fe2ec16aca (diff)
downloadhorizon-c4e2d2373bed23f56ab8b96fc028ffb1c5c56001.tar.gz
horizon-c4e2d2373bed23f56ab8b96fc028ffb1c5c56001.tar.bz2
horizon-c4e2d2373bed23f56ab8b96fc028ffb1c5c56001.tar.xz
horizon-c4e2d2373bed23f56ab8b96fc028ffb1c5c56001.zip
hscript: Mark code correctly for LCOV
Diffstat (limited to 'hscript/network.cc')
-rw-r--r--hscript/network.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/hscript/network.cc b/hscript/network.cc
index 28e382b..49cebb5 100644
--- a/hscript/network.cc
+++ b/hscript/network.cc
@@ -262,7 +262,7 @@ bool NetAddress::validate(ScriptOptions opts) const {
return false;
}
#endif
- return true;
+ return true; /* LCOV_EXCL_LINE */
}
bool NetAddress::execute(ScriptOptions) const {
@@ -355,6 +355,7 @@ bool Nameserver::execute(ScriptOptions opts) const {
return true;
}
+#ifdef HAS_INSTALL_ENV
std::ofstream resolvconf("/target/etc/resolv.conf", std::ios_base::app);
if(!resolvconf) {
output_error("installfile:" + std::to_string(line),
@@ -362,7 +363,8 @@ bool Nameserver::execute(ScriptOptions opts) const {
return false;
}
resolvconf << "nameserver " << _value << std::endl;
- return true;
+#endif /* HAS_INSTALL_ENV */
+ return true; /* LCOV_EXCL_LINE */
}
@@ -488,7 +490,7 @@ bool NetSSID::validate(ScriptOptions options) const {
::close(my_sock);
return true;
#else
- return false;
+ return false; /* LCOV_EXCL_LINE */
#endif
}