提交 83eb1a41 编写于 作者: D Dan Carpenter 提交者: Vasily Gorbik

s390/dasd: Fix a precision vs width bug in dasd_feature_list()

The "len" variable is the length of the option up to the next option or
to the end of the string which ever first.  We want to print the invalid
option so we want precision "%.*s" but the format is width "%*s" so it
prints up to the end of the string.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Tested-by: NStefan Haberland <sth@linux.ibm.com>
Signed-off-by: NStefan Haberland <sth@linux.ibm.com>
Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
上级 ebc3d179
......@@ -203,7 +203,7 @@ static int __init dasd_feature_list(char *str)
else if (len == 8 && !strncmp(str, "failfast", 8))
features |= DASD_FEATURE_FAILFAST;
else {
pr_warn("%*s is not a supported device option\n",
pr_warn("%.*s is not a supported device option\n",
len, str);
rc = -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册