« Previous | Next » 

Revision 9f9b17a4

ID9f9b17a4f0865286391e4d3a0a735230122a2289

Added by Jes Sorensen over 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 <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences