Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aeddb877 authored by Artem Bityutskiy's avatar Artem Bityutskiy
Browse files

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;