« Previous | Next » 

Revision 9f9b17a4


Added by Jes Sorensen almost 13 years ago

Introduce strtosz() library function to convert a string to a byte count.

strtosz() returns -1 on error. It now supports human unit formats in
eg. 1.0G, with better error handling.

The following suffixes are supported:
B/b = bytes
K/k = KB
M/m = MB
G/g = GB
T/t = TB

This patch changes -numa and -m input to use strtosz().

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences