Whamcloud - gitweb
LU-12757 utils: avoid newline inside error message 76/36176/5
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 12 Sep 2019 23:31:00 +0000 (17:31 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:07:33 +0000 (01:07 +0000)
commit3f3a241498be7e043df7e416da7fc8722a559498
tree63eb61d118b185bbe578cab5963b1c7df020fd44
parent7b136af8f46024fd48a773e5a79b817bca05d9e8
LU-12757 utils: avoid newline inside error message

When calling llapi_error() the format string should not end in a
newline, since the error string is appended to the output with
its own newline.

Fix several callers to not supply their own newline, and callers
that duplicate the error string in the error message itself.

In the case that there are callers that *do* include a newline,
handle this gracefully to avoid splitting the error across lines.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie8f7206d82faccb3b33e2fc62b00f5226b3ebbe5
Reviewed-on: https://review.whamcloud.com/36176
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_layout.c
lustre/utils/liblustreapi_pcc.c
lustre/utils/llog_reader.c
lustre/utils/llsom_sync.c