[Libvir] [PATCH] Three cleanup patches

* Add some extra generated files to .cvsignore * Remove an unused header in qemud/uuid.c * Log an error if xenHypervisorOpen fails because xenHypervisorInit has failed. Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland)

On Thu, May 10, 2007 at 05:24:00PM +0100, Richard W.M. Jones wrote:
* Add some extra generated files to .cvsignore
* Remove an unused header in qemud/uuid.c
* Log an error if xenHypervisorOpen fails because xenHypervisorInit has failed.
just wondering about the last one, would that add a message if trying as non-root ? Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel Veillard wrote:
On Thu, May 10, 2007 at 05:24:00PM +0100, Richard W.M. Jones wrote:
* Add some extra generated files to .cvsignore
* Remove an unused header in qemud/uuid.c
* Log an error if xenHypervisorOpen fails because xenHypervisorInit has failed.
just wondering about the last one, would that add a message if trying as non-root ?
Yes it does, so that third patch is wrong. In fact xenHypervisorInit already produces errors for all paths except the one where opening the HV connection fails. OK to commit the first two? Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421

On Fri, May 11, 2007 at 11:15:29AM +0100, Richard W.M. Jones wrote:
Daniel Veillard wrote:
On Thu, May 10, 2007 at 05:24:00PM +0100, Richard W.M. Jones wrote:
* Add some extra generated files to .cvsignore
* Remove an unused header in qemud/uuid.c
* Log an error if xenHypervisorOpen fails because xenHypervisorInit has failed.
just wondering about the last one, would that add a message if trying as non-root ?
Yes it does, so that third patch is wrong. In fact xenHypervisorInit already produces errors for all paths except the one where opening the HV connection fails.
Just make reporting the HV initialization error message conditional on getuid() == 0. We always want to see the error if root, and never if non-root.
OK to commit the first two?
Yes. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Daniel P. Berrange wrote:
On Fri, May 11, 2007 at 11:15:29AM +0100, Richard W.M. Jones wrote:
Daniel Veillard wrote:
On Thu, May 10, 2007 at 05:24:00PM +0100, Richard W.M. Jones wrote:
* Add some extra generated files to .cvsignore
* Remove an unused header in qemud/uuid.c
* Log an error if xenHypervisorOpen fails because xenHypervisorInit has failed. just wondering about the last one, would that add a message if trying as non-root ? Yes it does, so that third patch is wrong. In fact xenHypervisorInit already produces errors for all paths except the one where opening the HV connection fails.
Just make reporting the HV initialization error message conditional on getuid() == 0. We always want to see the error if root, and never if non-root.
That's not good. With the call to virXenError as is in the patch, it would hide other important errors. If we move the error to the part where it can't open /proc/xen/privcmd, then people would get that error when they didn't have Xen installed (more of a feature than an error).
OK to commit the first two?
Yes.
About to commit. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Richard W.M. Jones