summaryrefslogtreecommitdiff
path: root/src/common_device_name.c
AgeCommit message (Collapse)AuthorFilesLines
2013-06-24pci_id_file_open: move variable inside the #ifndef that uses itAlan Coopersmith1-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>
2013-06-07Protect config.h like usual.Thomas Klausner1-0/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-02-27Use O_CLOEXEC for internal file descriptorsAdam Jackson1-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>
2012-02-24Use correct type for pci_id file accessor functionsMathias Krause1-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>
2012-02-08Close pci.ids file when bailing out because realloc failedAlan Coopersmith1-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>
2011-09-16Strip trailing whitespaceAlan Coopersmith1-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>
2009-08-09Silence compiler warning about pci_id_file_open definitionJulien Cristau1-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
2008-11-19Don't open/gzopen pci.ids if we're not going to read itAlan Coopersmith1-9/+8
2008-07-08Handle compressed pci.idsKel Modderman1-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>
2008-03-06Bug #14818: Actually return the PCI vendor name, instead of NULL.Doug Chapman1-1/+1
2008-02-27Don't export private symbols.Julien Cristau1-1/+2
2007-01-12Remove extra fallback definition of PCIIDS_PATH.Eric Anholt1-4/+0
PCIIDS_PATH should always be provided by configure.ac and config.h.
2006-08-10Fix a segfault in populate_vendor that was triggered when the pci.ids fileIan Romanick1-1/+22
could not be opened. Thanks to Aaron Plattner for reporting this. Fix a couple possible memory leaks in the same function.
2006-07-30Added some function preamble comments.Ian Romanick1-2/+16
2006-03-27Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c.XORG-7_0_99_901Ian Romanick1-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.
2006-03-18Initial import of libpciaccess.Ian Romanick1-0/+435