Re: [Qemu-block] [PATCH v3 06/19] qemu-nbd: Avoid strtol open-coding

2019-01-15 Thread Richard W.M. Jones
On Sat, Jan 12, 2019 at 11:57:59AM -0600, Eric Blake wrote: > Our copy-and-pasted open-coding of strtol handling forgot to > handle overflow conditions. Use qemu_strto*() instead. > > In the case of --partition, since we insist on a user-supplied > partition to be non-zero, we can use 0 rather

Re: [Qemu-block] [PATCH v3 06/19] qemu-nbd: Avoid strtol open-coding

2019-01-15 Thread Eric Blake
On 1/15/19 6:31 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.01.2019 20:57, Eric Blake wrote: >> Our copy-and-pasted open-coding of strtol handling forgot to >> handle overflow conditions. Use qemu_strto*() instead. >> >> In the case of --partition, since we insist on a user-supplied >> partition

Re: [Qemu-block] [PATCH v3 06/19] qemu-nbd: Avoid strtol open-coding

2019-01-15 Thread Vladimir Sementsov-Ogievskiy
12.01.2019 20:57, Eric Blake wrote: > Our copy-and-pasted open-coding of strtol handling forgot to > handle overflow conditions. Use qemu_strto*() instead. > > In the case of --partition, since we insist on a user-supplied > partition to be non-zero, we can use 0 rather than -1 for our > initial

[Qemu-block] [PATCH v3 06/19] qemu-nbd: Avoid strtol open-coding

2019-01-12 Thread Eric Blake
Our copy-and-pasted open-coding of strtol handling forgot to handle overflow conditions. Use qemu_strto*() instead. In the case of --partition, since we insist on a user-supplied partition to be non-zero, we can use 0 rather than -1 for our initial value to distinguish when a partition is not