Skip to content

cutils: Add qemu_strto*l() wrappers

Carlos L. Torres qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v25 patches 2 repliesSuperseded
  3. v14 patches 3 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5cutils: Add qemu_strtol() wrapperinclude/qemu-common.h tests/test-cutils.c util/cutils.c+379 -00 replies
2/5cutils: Add qemu_strtoul() wrapperinclude/qemu-common.h tests/test-cutils.c util/cutils.c+352 -00 replies
3/5cutils: Add qemu_strtoll() wrapperinclude/qemu-common.h tests/test-cutils.c util/cutils.c+345 -00 replies
4/5cutils: Add qemu_strtoull() wrapperinclude/qemu-common.h tests/test-cutils.c util/cutils.c+348 -00 replies
5/5qmp: Add example usage of strto*l() qemu wrapperqmp.c+10 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers

From: "Carlos L. Torres" <[email protected]>

Introduce qemu_ wrappers for strtol/strtoul/strtoll/strtoull C functions, ensure that errno is checked, and if NULL is passed as the endptr argument, then whole string has to be a valid number on the given base, otherwise return appropriate error.

Different from the C strto*l() functions, these wrappers return through the 'result' out parameter.

Include unit-tests for each wrapper function.

Carlos L. Torres (5):
cutils: Add qemu_strtol() wrapper
cutils: Add qemu_strtoul() wrapper
cutils: Add qemu_strtoll() wrapper
cutils: Add qemu_strtoull() wrapper
qmp: Add example usage of strto*l() qemu wrapper

 include/qemu-common.h |    8 +
 qmp.c                 |   14 +-
 tests/test-cutils.c   | 1280 +++++++++++++++++++++++++++++++++++++++++++++++++
 util/cutils.c         |  136 ++++++
 4 files changed, 1434 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1