nic_router: don't use color codes in log

Issue #2609
This commit is contained in:
Martin Stein
2017-12-08 13:42:19 +01:00
committed by Christian Helmuth
parent bd36933636
commit 54532b99f9
2 changed files with 7 additions and 7 deletions

View File

@ -119,7 +119,7 @@ Domain::Domain(Configuration &config, Xml_node const node, Allocator &alloc)
throw Invalid(); throw Invalid();
} }
if (_config.verbose_domain_state()) { if (_config.verbose_domain_state()) {
log("\033[32m(", *this, ")\033[0m NIC sessions: 0"); log("[", *this, "] NIC sessions: 0");
} }
_ip_config_changed(); _ip_config_changed();
} }
@ -130,12 +130,12 @@ void Domain::_ip_config_changed()
if (!ip_config().valid) { if (!ip_config().valid) {
if (_config.verbose_domain_state()) { if (_config.verbose_domain_state()) {
log("\033[32m(", *this, ")\033[0m IP config: none"); log("[", *this, "] IP config: none");
} }
return; return;
} }
if (_config.verbose_domain_state()) { if (_config.verbose_domain_state()) {
log("\033[32m(", *this, ")\033[0m IP config:" log("[", *this, "] IP config:"
" interface ", ip_config().interface, " interface ", ip_config().interface,
", gateway ", ip_config().gateway); ", gateway ", ip_config().gateway);
} }

View File

@ -835,7 +835,7 @@ void Interface::_handle_eth(void *const eth_base,
try { try {
Ethernet_frame * const eth = new (eth_base) Ethernet_frame(eth_size); Ethernet_frame * const eth = new (eth_base) Ethernet_frame(eth_size);
if (_config().verbose()) { if (_config().verbose()) {
log("\033[33m(router <- ", _domain, ")\033[0m ", *eth); } log("(router <- ", _domain, ") ", *eth); }
if (_domain.ip_config().valid) { if (_domain.ip_config().valid) {
@ -893,7 +893,7 @@ void Interface::_handle_eth(void *const eth_base,
void Interface::send(Ethernet_frame &eth, Genode::size_t const size) void Interface::send(Ethernet_frame &eth, Genode::size_t const size)
{ {
if (_config().verbose()) { if (_config().verbose()) {
log("\033[33m(", _domain, " <- router)\033[0m ", eth); } log("(", _domain, " <- router) ", eth); }
try { try {
/* copy and submit packet */ /* copy and submit packet */
Packet_descriptor const pkt = _source().alloc_packet(size); Packet_descriptor const pkt = _source().alloc_packet(size);
@ -923,7 +923,7 @@ Interface::Interface(Entrypoint &ep,
_domain(domain) _domain(domain)
{ {
if (_config().verbose_domain_state()) { if (_config().verbose_domain_state()) {
log("\033[32m(", _domain, ")\033[0m NIC sessions: 1"); log("[", _domain, "] NIC sessions: 1");
} }
_domain.interface().set(*this); _domain.interface().set(*this);
} }
@ -959,7 +959,7 @@ Interface::~Interface()
{ {
_domain.interface().unset(); _domain.interface().unset();
if (_config().verbose_domain_state()) { if (_config().verbose_domain_state()) {
log("\033[32m(", _domain, ")\033[0m NIC sessions: 0"); log("[", _domain, "] NIC sessions: 0");
} }
/* destroy ARP waiters */ /* destroy ARP waiters */