Re: [Qemu-devel] [PATCH v2 07/22] qemu-nbd: Avoid strtol open-coding

2019-01-11 Thread Eric Blake
On 1/4/19 5:50 PM, Eric Blake wrote: >> hmm, as I understand, even if this compatibility exists, it's not a part >> of standard and nothing about off_t size in POSIX.. > > off_t allows you to run on older systems with 32-bit offsets and newer > systems with 64-bit offsets; but these days, even

Re: [Qemu-devel] [PATCH v2 07/22] qemu-nbd: Avoid strtol open-coding

2019-01-04 Thread Eric Blake
On 12/18/18 9:11 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.12.2018 16:53, 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 >>

Re: [Qemu-devel] [PATCH v2 07/22] qemu-nbd: Avoid strtol open-coding

2018-12-18 Thread Vladimir Sementsov-Ogievskiy
15.12.2018 16:53, 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

Re: [Qemu-devel] [PATCH v2 07/22] qemu-nbd: Avoid strtol open-coding

2018-12-15 Thread Richard W.M. Jones
On Sat, Dec 15, 2018 at 07:53:09AM -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

[Qemu-devel] [PATCH v2 07/22] qemu-nbd: Avoid strtol open-coding

2018-12-15 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