msm: ipc_logging: Add newline to string decode

If newline isn't present, add it to log string to properly display lines
through the debugfs.

Change-Id: I8f35826f1f9a634ba7b1f7d01d0ac136baf3fdc4
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 06ed50a8a125683782cb7a67fa0eded85e05ad59)
(cherry picked from commit 95d17d02cad1670377df6990b3243028e1ce83be)
This commit is contained in:
Eric Holmberg 2012-08-07 13:23:31 -06:00 committed by Stephen Boyd
parent 4f277b7ad1
commit 840782ad43

View file

@ -186,6 +186,15 @@ static void dfunc_string(struct encode_context *ectxt,
{
tsv_timestamp_read(ectxt, dctxt, " ");
tsv_byte_array_read(ectxt, dctxt, "");
/* add trailing \n if necessary */
if (*(dctxt->buff - 1) != '\n') {
if (dctxt->size) {
++dctxt->buff;
--dctxt->size;
}
*(dctxt->buff - 1) = '\n';
}
}
void check_and_create_debugfs(void)