Commit aeddb877 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: do not support kiB

Be strict and accept only KiB, MiB and GiB, not Kib, not kib, etc.
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment