From: "Carlos L. Torres" <cltorrespr@gmail.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH 0/4] cutils: Add qemu_strto*l() wrappers
Date: Tue, 7 Jul 2015 20:09:05 -0500 [thread overview]
Message-ID: <cover.1436317535.git.carlos.torres@rackspace.com> (raw)
From: "Carlos L. Torres" <carlos.torres@rackspace.com>
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.
Signed-off-by: Carlos L. Torres <carlos.torres@rackspace.com>
Carlos L. Torres (4):
cutils: Add qemu_strtol() wrapper
cutils: Add qemu_strtoul() wrapper
cutils: Add qemu_strtoll() wrapper
cutils: Add qemu_strtoull() wrapper
include/qemu-common.h | 8 +
tests/test-cutils.c | 1172 +++++++++++++++++++++++++++++++++++++++++++++++++
util/cutils.c | 131 ++++++
3 files changed, 1311 insertions(+)
--
1.9.1
next reply other threads:[~2015-07-08 1:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 1:09 Carlos L. Torres [this message]
2015-07-08 1:09 ` [Qemu-devel] [PATCH 1/4] cutils: Add qemu_strtol() wrapper Carlos L. Torres
2015-07-08 12:59 ` Paolo Bonzini
2015-07-08 1:09 ` [Qemu-devel] [PATCH 2/4] cutils: Add qemu_strtoul() wrapper Carlos L. Torres
2015-07-08 13:01 ` Paolo Bonzini
2015-07-08 1:09 ` [Qemu-devel] [PATCH 3/4] cutils: Add qemu_strtoll() wrapper Carlos L. Torres
2015-07-08 1:09 ` [Qemu-devel] [PATCH 4/4] cutils: Add qemu_strtoull() wrapper Carlos L. Torres
2015-07-08 13:02 ` [Qemu-devel] [PATCH 0/4] cutils: Add qemu_strto*l() wrappers Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1436317535.git.carlos.torres@rackspace.com \
--to=cltorrespr@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.