Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-11-11 Thread Andreas Färber
Am 25.09.2015 um 16:49 schrieb Eric Blake: > On 09/25/2015 06:39 AM, Andreas Färber wrote: >> All integers would get parsed by strtoll(), not handling the case of >> UINT64 properties with the most significient bit set. >> >> Implement a .type_uint64 visitor callback, reusing the existing >> parse_

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Eric Blake
On 09/30/2015 07:23 AM, Andreas Färber wrote: > Am 30.09.2015 um 15:19 schrieb Markus Armbruster: >> Andreas Färber writes: >>> As a bug fix, ignore warnings about preference of qemu_strto[u]ll(). >> >> I'm not sure I get this sentence. > > This patch causes checkpatch warnings. I intentionally d

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Eric Blake
On 09/30/2015 07:19 AM, Markus Armbruster wrote: > > The (essentially undocumented) Visitor abstraction has the following > methods for integers: I proposed documentation at: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg05434.html > > * Mandatory: type_int() > > Interface uses i

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Andreas Färber
Am 30.09.2015 um 15:19 schrieb Markus Armbruster: > Andreas Färber writes: >> As a bug fix, ignore warnings about preference of qemu_strto[u]ll(). > > I'm not sure I get this sentence. This patch causes checkpatch warnings. I intentionally do not address them in this bug-fix patch, but instead i

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Markus Armbruster
Andreas Färber writes: > All integers would get parsed by strtoll(), not handling the case of > UINT64 properties with the most significient bit set. This mess is part of a bigger mess, I'm afraid. The major ways integers get parsed are: * QMP: parse_literal() in qmp/qobject/json-parser.c T

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-25 Thread Eric Blake
On 09/25/2015 06:39 AM, Andreas Färber wrote: > All integers would get parsed by strtoll(), not handling the case of > UINT64 properties with the most significient bit set. > > Implement a .type_uint64 visitor callback, reusing the existing > parse_str() code through a new argument, using strtoull

[Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-25 Thread Andreas Färber
All integers would get parsed by strtoll(), not handling the case of UINT64 properties with the most significient bit set. Implement a .type_uint64 visitor callback, reusing the existing parse_str() code through a new argument, using strtoull(). As a bug fix, ignore warnings about preference of q