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:
Artem Bityutskiy 2007-12-26 14:25:58 +02:00
parent b6b76ba466
commit aeddb87718

View file

@ -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;