summaryrefslogtreecommitdiff
path: root/src/common_device_name.c
Commit message (Collapse)AuthorAgeFilesLines
* pci_id_file_open: move variable inside the #ifndef that uses itAlan Coopersmith2013-06-241-1/+1
| | | | | | | | Clears up gcc warning on Solaris: common_device_name.c: In function 'pci_id_file_open': common_device_name.c:83:17: warning: unused variable 'result' [-Wunused-variable] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Protect config.h like usual.Thomas Klausner2013-06-071-0/+3
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use O_CLOEXEC for internal file descriptorsAdam Jackson2012-02-271-2/+20
| | | | | | | | Well, almost all of them. zlib doesn't support "e" in the mode string in gzopen() though it will silently accept and ignore it, and Solaris appears not to support "e" in the mode string at all. Signed-off-by: Adam Jackson <ajax@redhat.com>
* Use correct type for pci_id file accessor functionsMathias Krause2012-02-241-2/+2
| | | | | | | | | This fixes the compiler warning of using the wrong type for gzgets() and gzclose() as they want a gzFile argument, not a pointer to gzFile. The abstraction layer pci_id_file should just abstract the full type. Signed-off-by: Mathias Krause <mathias.krause@secunet.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Close pci.ids file when bailing out because realloc failedAlan Coopersmith2012-02-081-1/+2
| | | | | | | | | | | | Error: File Leak Leaked File f at line 272 of src/common_device_name.c in function 'populate_vendor'. f initialized at line 204 with fopen("/usr/share/hwdata/pci.ids", "r"). [ This bug was found by the Parfait 0.5.0 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Strip trailing whitespaceAlan Coopersmith2011-09-161-14/+14
| | | | | | | Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Silence compiler warning about pci_id_file_open definitionJulien Cristau2009-08-091-1/+1
| | | | | | src/common_device_name.c:59: warning: function declaration isn't a prototype src/common_device_name.c: In function 'pci_id_file_open': src/common_device_name.c:59: warning: old-style function definition
* Don't open/gzopen pci.ids if we're not going to read itAlan Coopersmith2008-11-191-9/+8
|
* Handle compressed pci.idsKel Modderman2008-07-081-10/+29
| | | | | | | Add an option to build with zlib support so we can find vendor/device information if the pci.ids file is gzipped. Signed-off-by: Julien Cristau <jcristau@debian.org>
* Bug #14818: Actually return the PCI vendor name, instead of NULL.Doug Chapman2008-03-061-1/+1
|
* Don't export private symbols.Julien Cristau2008-02-271-1/+2
|
* Remove extra fallback definition of PCIIDS_PATH.Eric Anholt2007-01-121-4/+0
| | | | PCIIDS_PATH should always be provided by configure.ac and config.h.
* Fix a segfault in populate_vendor that was triggered when the pci.ids fileIan Romanick2006-08-101-1/+22
| | | | | could not be opened. Thanks to Aaron Plattner for reporting this. Fix a couple possible memory leaks in the same function.
* Added some function preamble comments.Ian Romanick2006-07-301-2/+16
|
* Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c.XORG-7_0_99_901Ian Romanick2006-03-271-3/+28
| | | | | | Bump version to 0.3.0. Replace pci_get_name with pci_get_strings. This function matches the functionality provided by the Xorg scanpci module almost identically.
* Initial import of libpciaccess.Ian Romanick2006-03-181-0/+435