File: fix-device-detection.patch

package info (click to toggle)
bumblebee 3.2.1-32
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,304 kB
  • sloc: ansic: 2,845; sh: 1,792; makefile: 187
file content (15 lines) | stat: -rw-r--r-- 791 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: Fix detection of devices on bus numbers larger than 9
Origin: upstream, https://github.com/Bumblebee-Project/Bumblebee/commit/2073f8537412aa47755eb6f3f22a114403e5285b
Applied-Upstream: commit:2073f8537412aa47755eb6f3f22a114403e5285b
Bug: https://github.com/Bumblebee-Project/Bumblebee/issues/573
--- a/src/bbsecondary.c
+++ b/src/bbsecondary.c
@@ -138,7 +138,7 @@
   if (!bb_is_running(bb_status.x_pid)) {
     char pci_id[12];
     static char *x_conf_file;
-    snprintf(pci_id, 12, "PCI:%02x:%02x:%o", pci_bus_id_discrete->bus,
+    snprintf(pci_id, 12, "PCI:%02d:%02d:%o", pci_bus_id_discrete->bus,
             pci_bus_id_discrete->slot, pci_bus_id_discrete->func);
     if (!x_conf_file) {
       x_conf_file = xorg_path_w_driver(bb_config.x_conf_file, bb_config.driver);