Subject: Re: [PATCH iproute2/net-next v3]tc: B.W limits can now be specified in %.

From: Stephen Hemminger <[email-masked]>
Date: Fri, 17 Nov 2017 12:54:29 -0800

On Sat, 18 Nov 2017 02:13:38 +0530
Nishanth Devarajan <[email-masked]> wrote:

> +	result = strtoul(buf, &endp, 0);
> +
> +	if (*endp || buf == endp) {
> +		fprintf(stderr, "value \"%s\" in file %s is not a number\n",
> +			buf, fname);
> +		goto out;
> +	}
> +
> +	if (result == ULONG_MAX && errno == ERANGE) {
> +		fprintf(stderr, "strtoul %s: %s", fname, strerror(errno));
> +		goto out;
> +	}

Since speed value of unknown is represented as "-1" I think you need to
change this API to take signed value (ie use strtol)