Am 15.09.2010 20:46, schrieb Andreas Färber:
Am 15.09.2010 um 14:23 schrieb jes.soren...@redhat.com:
[...]
+/*
+ * Convert string to bytes, allowing either K/k for KB, M/m for MB,
+ * G/b for GB or T/t for TB. Default without any postfix is MB.
^^^ typo
+ * End pointer will be returned in *end, if end is valid.
+ * Return 0 on error.
+ */
You seem to be refactoring existing code into this function, but the
use of such suffixes usually brings up the question whether it's
factor 1024 or 1000.
Here you're using 1024 apparently. If you don't want the user dealing
with (imo ugly) Ki/Mi/Gi/Ti units this should at least be documented
accordingly: G/g for GiB, etc. or G/g for GB = 1024 MB, etc.
Andreas
[snip]
I'd prefer the standard prefixes: KiB, MiB, GiB for powers of 1024, KB,
MB, GB for powers of 1000.
The standard has the big advantage of being a standard, even if not
everybody likes it.
Existing QEMU code should be cleaned (= changed) were needed.
Stefan