[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Carlos L. Torres
Subject: [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers
Date: Sun, 19 Jul 2015 18:02:16 -0500

From: "Carlos L. Torres" <address@hidden>

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

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

Include unit-tests for each wrapper function.

Signed-off-by: Carlos L. Torres <address@hidden>

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(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]