From 1da7c5d76ee6abca43b83485adcd66d3a1ba55f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Mon, 4 Sep 2017 12:04:24 +0200 Subject: [PATCH] afb-hook: change output format MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Putting HOOK: in front is better because other outputs are also prefixed with SOMETHING: It greatly improves readability Change-Id: I591126198b630e3b7977ecb2501bc59163fd0c11 Signed-off-by: José Bollo --- src/afb-hook.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/afb-hook.c b/src/afb-hook.c index 664ef125..c2baf472 100644 --- a/src/afb-hook.c +++ b/src/afb-hook.c @@ -177,24 +177,24 @@ static void _hook_(const char *fmt1, const char *fmt2, va_list arg2, ...) #else /* new behaviour: emits directly to stderr */ static void _hook_(const char *fmt1, const char *fmt2, va_list arg2, ...) { - static const char chars[] = "[HOOK ] \n"; + static const char chars[] = "HOOK: [] \n"; char *mem1, *mem2, buf1[256], buf2[2000]; struct iovec iov[5]; va_list arg1; iov[0].iov_base = (void*)&chars[0]; - iov[0].iov_len = 6; + iov[0].iov_len = 7; va_start(arg1, arg2); iov[1].iov_base = _pbuf_(fmt1, arg1, &mem1, buf1, sizeof buf1, &iov[1].iov_len); va_end(arg1); - iov[2].iov_base = (void*)&chars[6]; + iov[2].iov_base = (void*)&chars[7]; iov[2].iov_len = 2; iov[3].iov_base = _pbuf_(fmt2, arg2, &mem2, buf2, sizeof buf2, &iov[3].iov_len); - iov[4].iov_base = (void*)&chars[8]; + iov[4].iov_base = (void*)&chars[9]; iov[4].iov_len = 1; writev(2, iov, 5); -- 2.16.6