staging: lustre: obd: add newline for dumped config record
authorAmir Shehata <amir.shehata@intel.com>
Thu, 28 Apr 2016 01:37:11 +0000 (21:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 04:53:18 +0000 (21:53 -0700)
The function class_config_parse_rec() parses the llog record
and places it into a buffer to be returned. That buffer needs
to end with a newline which is currently missing.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2149
Reviewed-on: http://review.whamcloud.com/4254
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/obd_config.c

index 0afbc01..a3a2abc 100644 (file)
@@ -1349,6 +1349,7 @@ static int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf,
                                        lustre_cfg_string(lcfg, i));
                }
        }
+       ptr += snprintf(ptr, end - ptr, "\n");
        /* return consumed bytes */
        rc = ptr - buf;
        return rc;