This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Bug fix patch of libxl

Jun Zhu (Intern) writes ("[Xen-devel] Bug fix patch of libxl"):
> A small bug in libxl. Fixed in attatched patch.

Thanks for the report and the patch.  I'm not entirely convinced about
your fix, however.

Firstly, this is only one of many callers of is_hvm.  Secondly, the
error logging should probably be in is_hvm, not in the caller.
Thirdly I think replacing the if() with a switch makes matters much
less clear; it would be better to do
  hvm = is_hvm(...);
  if (hvm<0) return hvm;
  if (hvm) {
or some such.

And fourthly when you submit a patch you should just delete the old
code from the file, not comment it out.  Our version control system
will let us retrieve the old version if we want to read it.

This is probably all a bit much so I'll see if I can do a better fix.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>