提交 aeddb877 编写于 作者: A Artem Bityutskiy

UBI: do not support kiB

Be strict and accept only KiB, MiB and GiB, not Kib, not kib, etc.
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 b6b76ba4
...@@ -1038,10 +1038,8 @@ static int __init bytes_str_to_int(const char *str) ...@@ -1038,10 +1038,8 @@ static int __init bytes_str_to_int(const char *str)
case 'M': case 'M':
result *= 1024; result *= 1024;
case 'K': case 'K':
case 'k':
result *= 1024; result *= 1024;
if (endp[1] == 'i' && (endp[2] == '\0' || if (endp[1] == 'i' && endp[2] == 'B')
endp[2] == 'B' || endp[2] == 'b'))
endp += 2; endp += 2;
case '\0': case '\0':
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册