From: Debian NVIDIA Maintainers Date: Sat, 27 Jan 2024 00:28:10 +0000 (+0100) Subject: Fix detection of devices on bus numbers larger than 9 X-Git-Tag: archive/raspbian/3.2.1-30+rpi1^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5e99e558aff3b89d954f2c961155bc46e02177dd;p=bumblebee.git 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 Gbp-Pq: Name fix-device-detection.patch --- diff --git a/src/bbsecondary.c b/src/bbsecondary.c index 71a6b73..6b635ee 100644 --- a/src/bbsecondary.c +++ b/src/bbsecondary.c @@ -138,7 +138,7 @@ bool start_secondary(bool need_secondary) { 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);