CWARN() or CERROR() requires a certain format. That is
it should start with '%s:' and end with '%d' or '%ld'.
Otherwise it will throw an warning. This patch extends
checks for type '%zd'. As few return types could be of
size_t.
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ida4f41af6b8fda0b028daeea18231b2d01905c31
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52421
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
"Console messages should start with '%s:' to print device name\n" . $herecurr)
}
- # Check for "rc = %d" or "rc = %ld" at the end of errors
- if ($line !~ /LCONSOLE/ && $rawline !~ /: rc = \%l?d\\n\",/) {
+ # Check for "rc = %d" or "rc = %ld" or "rc = %zd"
+ # at the end of errors
+ if ($line !~ /LCONSOLE/ &&
+ $rawline !~ /: rc = \%l|z?d\\n\",/) {
WARN("CERROR_RET",
- "Console messages should end with ': rc = %d' or 'rc = %ld'\n" . $herecurr);
+ "Console messages should end with ': rc = %[lz]d'\n" . $herecurr);
}
# This is fine as we are only matching the first part.