- Existed : 0(success), ERRNO(fail)
- Now : written bytes(success), ERRNO(fail)
Change-Id: Icc4e9906079942d727b677c53b909d80b093941e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
static int __write_to_log_sd_journal(log_id_t log_id, log_priority prio, const char *tag, const char *msg)
{
const char *lid_str = dlog_id_to_string(log_id);
+ int ret;
pid_t tid = (pid_t)syscall(SYS_gettid);
vec[4].iov_base = (void *)_tid;
vec[4].iov_len = strlen(vec[4].iov_base);
- return sd_journal_sendv(vec, 5);
+ ret = sd_journal_sendv(vec, 5);
+
+ if (ret == 0)
+ return (vec[0].iov_len + vec[1].iov_len + vec[2].iov_len + vec[3].iov_len + vec[4].iov_len);
+ else
+ return ret;
}
#else