Commit 74be753e authored by Marcel's avatar Marcel
Browse files

Define BusID depending on the default video device unit.

Showing with 4 additions and 1 deletion
+4 -1
......@@ -125,11 +125,14 @@ do_initgfx()
driver=${initgfx_default}
fi
echo "${driver}" > /var/run/gfxdriver
unit=$(sysctl -n hw.pci.default_vgapci_unit)
busID=$(pciconf -lv | grep ^vgapci${unit} | head -1 | \
sed -E 's/^vgapci[0-9]@pci[0-9]:([0-9:]+):.*$/\1/')
eval cfg_path=\${path_${driver}_cfg}
(printf "Section \"Device\"\n"; \
printf "\tIdentifier \"Card0\"\n"; \
printf "\tDriver \"${driver}\"\n"; \
printf "\tBusID \"PCI:$busID\"\n"; \
printf "EndSection\n") > ${cfg_path}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment