Re: [PATCH] Check that virsh -d argument is numeric

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

 



On 08/02/10 - 09:22:26PM, Daniel Veillard wrote:
> On Mon, Aug 02, 2010 at 12:19:54PM -0600, Eric Blake wrote:
> > On 08/02/2010 09:30 AM, Daniel Veillard wrote:
> > >   Having been bitten one more time by the use of -d to pass the
> > > hypervisor URI instead of -c (confusion coming from CVS using
> > > -d to specify the root), I suggest to drop atoi and use the
> > > function with checking and error out with proper explanation instead
> > > of silently failing !
> > 
> > Hear hear - atoi() is inherently stupid.  There's a 'make syntax-check'
> > that we could turn on to prohibit all use of atoi(), but I don't know if
> > the code base is ready for that, so I'll save it for another patch on
> > another day.
> 
>   let's try to clean this up after 0.8.3

Yeah, agreed.  There aren't a huge number of uses of atoi() in the codebase,
but there are enough to require a bit of churn.  Best left until after the
release.

-- 
Chris Lalancette

--
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]