Skip to contentSkip to conversation

tools: add newlines to xenstored WRL_LOG

PATCH In review Olaf Hering 2 participants 4 messages May 3, 2021 – May 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: add newlines to xenstored WRL_LOG

According to syslog(3) the fmt string does not need a newline. The mini-os implementation of syslog requires the trailing newline. Other calls to syslog do include the newline already, add it also to WRL_LOG.

---
 tools/xenstore/xenstored_domain.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/xenstore/xenstored_domain.c +3 -3
index 3d4d0649a2..2d333b3ff6 100644
@@ -1132,10 +1132,10 @@ void wrl_apply_debit_actual(struct domain *domain)
 	if (domain->wrl_credit < 0) {
 		if (!domain->wrl_delay_logged) {
 			domain->wrl_delay_logged = true;
-			WRL_LOG(now, "domain %ld is affected",
+			WRL_LOG(now, "domain %ld is affected\n",
 				(long)domain->domid);
 		} else if (!wrl_log_last_warning) {
-			WRL_LOG(now, "rate limiting restarts");
+			WRL_LOG(now, "rate limiting restarts\n");
 		}
 		wrl_log_last_warning = now.sec;
 	}
@@ -1145,7 +1145,7 @@ void wrl_log_periodic(struct wrl_timestampt now)
 {
 	if (wrl_log_last_warning &&
 	    (now.sec - wrl_log_last_warning) > WRL_LOGEVERY) {
-		WRL_LOG(now, "not in force recently");
+		WRL_LOG(now, "not in force recently\n");
 		wrl_log_last_warning = 0;
 	}
 }
#1 lore raw
Quoted 3 lines · Olaf Hering

According to syslog(3) the fmt string does not need a newline. The mini-os implementation of syslog requires the trailing newline. Other calls to syslog do include the newline already, add it also to WRL_LOG.

Mind doing the same for the two syslog() calls in xenstored_core.c lacking the newline?

Juergen

#2 lore raw

Am Mon, 10 May 2021 09:31:41 +0200
schrieb Juergen Gross <[email protected]>:

Quoted 2 lines

Mind doing the same for the two syslog() calls in xenstored_core.c lacking the newline?

I will send a separate patch for them.

Olaf

Reviewed-by
#3 lore raw
Quoted 7 lines · Olaf Hering

Am Mon, 10 May 2021 09:31:41 +0200
schrieb Juergen Gross <[email protected]>:

Quoted 2 lines

Mind doing the same for the two syslog() calls in xenstored_core.c lacking the newline?

I will send a separate patch for them.

Okay, in this case you can add my

to the WRL_LOG patch.

Juergen