On 07/23/10 - 01:34:23PM, Eric Blake wrote: > On 07/23/2010 01:21 PM, Chris Lalancette wrote: > >Some buggy PCI devices actually support FLR, but > >forget to advertise that fact in their PCI config space. > >However, Virtual Functions on SR-IOV devices are > >*required* to support FLR by the spec, so force has_flr > >on if this is a virtual function. > > > >+ > >+ if (virAsprintf(&path, PCI_SYSFS "devices/%s/physfn", dev->name)< 0) { > > Weird spacing around < Yeah, I think Paolo is right, this might be a thunderbird bug. It looks OK in the original patch I sent. > > >+ VIR_ERROR("Failed to allocate memory when checking FLR for device %s", > >+ dev->id); > > If this fails, it is likely that other code will run out of memory > soon, too. Why not just call the standard git OOM handler here? I could go either way on this one. Up until now we only ever returned 0 or 1 from this function, but with the memory allocation, we can also have -1 (for failure). I guess I'll re-code it to return -1, and then I can use virOOMError here. Thanks for the review. -- Chris Lalancette -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list