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:
parent
1bd4283c08
commit
904adb80d4
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue