On Fri, Jan 28, 2011 at 08:33:20AM -0700, Eric Blake wrote:
On 01/28/2011 05:11 AM, Osier Yang wrote:
> 于 2011年01月28日 20:02, Daniel P. Berrange 写道:
>> On Fri, Jan 28, 2011 at 07:53:44PM +0800, Osier Yang wrote:
>>> As cgroup doesn't allow one writes negative into files like cpu.shares,
>>> (e.g. echo -1> /cgroup/cpu/libvirt/qemu/rhel6/cpu.shares), user will be
>>> confused if libvirt accepts negative value and converts it into unsigned
>>> int (or long int, etc) silently.
But strtoul() is explicitly documented as accepting -1 as shorthand for
ULONG_MAX, and as a command-line convenience, I much prefer that
shorthand over 18446744073709551615. I don't see this as confusing.
I didn't know about that behaviour :-) I guess this is at worst
a documentation problem then, not something we need change in
code.
Daniel