Skip to content

Commit

Permalink
UBI: do not support kiB
Browse files Browse the repository at this point in the history
Be strict and accept only KiB, MiB and GiB, not Kib, not kib, etc.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Dec 26, 2007
1 parent b6b76ba commit aeddb87
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/ubi/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aeddb87

Please sign in to comment.