Re: [PATCH] virsh: Error prompt if one passes negative value for scheduler setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]