OSDN Git Service
(root)
/
android-x86
/
external-libpciaccess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7faac3
)
Make scanpci exit cleanly if pci_system_init() fails.
author
Eric Anholt
<eric@anholt.net>
Fri, 3 Aug 2007 17:40:53 +0000
(10:40 -0700)
committer
Eric Anholt
<eric@anholt.net>
Fri, 3 Aug 2007 17:40:53 +0000
(10:40 -0700)
src/scanpci.c
patch
|
blob
|
history
diff --git
a/src/scanpci.c
b/src/scanpci.c
index
a3ec5c5
..
2c49d80
100644
(file)
--- a/
src/scanpci.c
+++ b/
src/scanpci.c
@@
-24,6
+24,7
@@
#include <stdlib.h>
#include <stdio.h>
+#include <err.h>
#include "pciaccess.h"
@@
-176,8
+177,11
@@
int main( int argc, char ** argv )
{
struct pci_device_iterator * iter;
struct pci_device * dev;
+ int ret;
- pci_system_init();
+ ret = pci_system_init();
+ if (ret != 0)
+ err(1, "Couldn't initialize PCI system");
iter = pci_slot_match_iterator_create( NULL );