diff options
author | marha <marha@users.sourceforge.net> | 2014-07-11 18:00:29 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-11 18:00:29 +0200 |
commit | e708bebcc029873004ade4241f347ce8c58896af (patch) | |
tree | 0b942757c1846afbe11e4158438981d6a645849d /xorg-server/hw/xfree86/common/xf86pciBus.c | |
parent | fe03d6aef6338e43593f164b09ae993bcd0ecbdd (diff) | |
download | vcxsrv-e708bebcc029873004ade4241f347ce8c58896af.tar.gz vcxsrv-e708bebcc029873004ade4241f347ce8c58896af.tar.bz2 vcxsrv-e708bebcc029873004ade4241f347ce8c58896af.zip |
fontconfig libX11 xserver mkfontscale mesa git update 11 July 2014
xserver commit 9de3cc8daa4c6e877d30a0e8ccfe0cc159f1dbe3
libX11 commit ff9a5c199251a84fa59d14fd48dadb3f8920b54b
mkfontscale commit 47908fd7a0d061fdcd21e3498da4e223ca9136d9
fontconfig commit dca5d0feee5eb6428bec48b1aff4396cf92c76c0
mesa commit f381c27c548aa28b003c8e188f5d627ab4105f76
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86pciBus.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86pciBus.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index 0f76a03ee..c06b04033 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -1320,8 +1320,9 @@ xchomp(char *line) * don't export their PCI ID's properly. If distros don't end up using this * feature it can and should be removed because the symbol-based resolution * scheme should be the primary one */ -void -xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_chip) +int +xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, + char *matches[], int nmatches) { DIR *idsdir; FILE *fp; @@ -1331,11 +1332,11 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c ssize_t read; char path_name[256], vendor_str[5], chip_str[5]; uint16_t vendor, chip; - int i, j; + int i = 0, j; idsdir = opendir(PCI_TXT_IDS_PATH); if (!idsdir) - return; + return 0; xf86Msg(X_INFO, "Scanning %s directory for additional PCI ID's supported by the drivers\n", @@ -1386,10 +1387,6 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c } } if (vendor == match_vendor && chip == match_chip) { - i = 0; - while (matches[i]) { - i++; - } matches[i] = (char *) malloc(sizeof(char) * strlen(direntry->d_name) - 3); @@ -1412,6 +1409,7 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c } xf86Msg(X_INFO, "Matched %s from file name %s\n", matches[i], direntry->d_name); + i++; } } else { @@ -1425,6 +1423,7 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c end: free(line); closedir(idsdir); + return i; } #endif /* __linux__ */ @@ -1435,7 +1434,7 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c int xf86PciMatchDriver(char *matches[], int nmatches) { - int i; + int i = 0; struct pci_device *info = NULL; struct pci_device_iterator *iter; @@ -1450,13 +1449,10 @@ xf86PciMatchDriver(char *matches[], int nmatches) pci_iterator_destroy(iter); #ifdef __linux__ if (info) - xf86MatchDriverFromFiles(matches, info->vendor_id, info->device_id); + i += xf86MatchDriverFromFiles(info->vendor_id, info->device_id, + matches, nmatches); #endif - for (i = 0; (i < nmatches) && (matches[i]); i++) { - /* find end of matches list */ - } - if ((info != NULL) && (i < nmatches)) { i += xf86VideoPtrToDriverList(info, &(matches[i]), nmatches - i); } |