Re: [libvirt] [PATCH] pci: Give an explicit error if device not found

2010-05-17 Thread Cole Robinson
On 05/04/2010 05:07 PM, Eric Blake wrote: On 04/30/2010 09:44 AM, Cole Robinson wrote: @@ -1028,6 +1028,7 @@ pciGetDevice(unsigned domain, unsigned function) { pciDevice *dev; +char devdir[PATH_MAX]; Using PATH_MAX as an array size is dangerous; it fails on GNU

Re: [libvirt] [PATCH] pci: Give an explicit error if device not found

2010-05-04 Thread Eric Blake
On 04/30/2010 09:44 AM, Cole Robinson wrote: @@ -1028,6 +1028,7 @@ pciGetDevice(unsigned domain, unsigned function) { pciDevice *dev; +char devdir[PATH_MAX]; Using PATH_MAX as an array size is dangerous; it fails on GNU Hurd where there is no minimum size. Also, it

[libvirt] [PATCH] pci: Give an explicit error if device not found

2010-04-30 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/pci.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/util/pci.c b/src/util/pci.c index 81193b7..e1e11bc 100644 --- a/src/util/pci.c +++ b/src/util/pci.c @@ -1028,6 +1028,7 @@