On Thu, 08/01 10:00, Luiz Capitulino wrote:
> On Thu, 01 Aug 2013 07:52:17 -0600
> Eric Blake wrote:
>
> > On 08/01/2013 12:31 AM, Fam Zheng wrote:
> > > Fix it by calling strtoll instead, which will report ERANGE as expected.
> > >
> > > (HMP) block_set_io_throttle ide0-hd0
On Thu, 08/01 07:52, Eric Blake wrote:
> On 08/01/2013 12:31 AM, Fam Zheng wrote:
> > Fix it by calling strtoll instead, which will report ERANGE as expected.
> >
> > (HMP) block_set_io_throttle ide0-hd0 99 0 0 0 0 0
> > (HMP) block_set_io_throttle ide0-hd0
On Thu, 01 Aug 2013 07:52:17 -0600
Eric Blake wrote:
> On 08/01/2013 12:31 AM, Fam Zheng wrote:
> > Fix it by calling strtoll instead, which will report ERANGE as expected.
> >
> > (HMP) block_set_io_throttle ide0-hd0 99 0 0 0 0 0
> > (HMP) block_set_io_throttle ide0-hd0
On 08/01/2013 12:31 AM, Fam Zheng wrote:
> Fix it by calling strtoll instead, which will report ERANGE as expected.
>
> (HMP) block_set_io_throttle ide0-hd0 99 0 0 0 0 0
> (HMP) block_set_io_throttle ide0-hd0 999 0 0 0 0 0
> number too large
> (HMP)
We call strtoull(3) to parse a string to int. the range we can accept
with our local variable "int64_t n" is (-9223372036854775808 ~
9223372036854775807), but strtoull(3) can return (0 ~
18446744073709551615UL).
So when we pass a int from HMP within the range of 9223372036854775808 ~
1844674407370