logutil: pipe: Rework logutil request 61/142861/12
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Wed, 16 Aug 2017 10:42:13 +0000 (12:42 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Wed, 16 Aug 2017 10:46:18 +0000 (12:46 +0200)
commitee1adfa8708f3a0cf00ffe3a9b604b5971c7450c
tree40b1753c2a00cb09c18c8c71b7fa895771fd3071
parent9f018bd162ad25ad17acb367d7fe1d7218e14882
logutil: pipe: Rework logutil request

This commit introduces iovec+writev() usage to construct logutil
request instead of malloc.  This allows us to simplify error handling
a bit.

Additionally, fix dlog_control_msg payload length calculation -
it needs to have at most MAX_LOGGER_REQUEST_LEN (including
terminating null byte).

Change-Id: Ib9ab85355a6760a26a9250b20f4ea0dc1b1b2532
src/logger/logger.c
src/logutil/logutil.c