summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-04 12:04:24 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-09-07 09:43:13 +0200
commit1da7c5d76ee6abca43b83485adcd66d3a1ba55f8 (patch)
treeffae1d339db5e1ed73bb9b109f0b5684f9302cfc
parent5f2475376640b19c95c254cee2e0a15dbd9fa43c (diff)
afb-hook: change output format
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 <jose.bollo@iot.bzh>
-rw-r--r--src/afb-hook.c8
1 files 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);
9' href='#n169'>169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363