[Libvir] [PATCH] Fix parameter validation of virsh schedinfo

Daniel Veillard veillard at redhat.com
Tue Nov 6 09:41:24 UTC 2007


On Tue, Nov 06, 2007 at 09:03:17AM +0900, Masayuki Sunou wrote:
> Hi
> 
> User cannot judge whether virsh schedinfo successes or fails,
> because it does not become error when character string is set to an option.
> 
> --------------------------------------------------
> # virsh schedinfo 0 --weight aaa
> Scheduler      : credit
> weight         : 256
> cap            : 0
> --------------------------------------------------
> 
> This patch fixes to become error when character string is set.

  Okay, that makes sense, one could argue that sinc the scheduler 
API is so flexible, vish whould not try to interpret the parameters and
pass them as found to libvirt, but the existing code is already assuming
int values in virsh, so yes error checking needs to be added.
  At some point, though this will need to be revisited when more
schedulers case have to be supported.

  Applied and commited,

    thanks a lot !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list