mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
UBI: do not support kiB
Be strict and accept only KiB, MiB and GiB, not Kib, not kib, etc. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
b6b76ba466
commit
aeddb87718
1 changed files with 1 additions and 3 deletions
|
@ -1038,10 +1038,8 @@ static int __init bytes_str_to_int(const char *str)
|
|||
case 'M':
|
||||
result *= 1024;
|
||||
case 'K':
|
||||
case 'k':
|
||||
result *= 1024;
|
||||
if (endp[1] == 'i' && (endp[2] == '\0' ||
|
||||
endp[2] == 'B' || endp[2] == 'b'))
|
||||
if (endp[1] == 'i' && endp[2] == 'B')
|
||||
endp += 2;
|
||||
case '\0':
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue