UBI: do not support kiB

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 8 02:59:03 EST 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=aeddb87718823fb81b896155b34d1bb4c8cae874
Commit:     aeddb87718823fb81b896155b34d1bb4c8cae874
Parent:     b6b76ba466bbd47397efad0fdaeaa5ebf7d462c7
Author:     Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
AuthorDate: Wed Dec 26 14:25:58 2007 +0200
Committer:  Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
CommitDate: Wed Dec 26 19:15:18 2007 +0200

    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 at nokia.com>
---
 drivers/mtd/ubi/build.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 5098e6d..b967191 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -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;



More information about the linux-mtd-cvs mailing list