9
0
Fork 0

lib: misc: add 'iB' suffixes to strtoull_suffix

Since this is the 'official' notation, we should support it.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Wolfram Sang 2012-12-17 16:48:24 +01:00 committed by Sascha Hauer
parent 1bd4283c08
commit 904adb80d4
1 changed files with 4 additions and 1 deletions

View File

@ -47,8 +47,11 @@ unsigned long long strtoull_suffix(const char *str, char **endp, int base)
break;
}
if (strncmp(end, "iB", 2) == 0)
end += 2;
if (endp)
*endp = (char *)end;
*endp = end;
return val;
}