Skip to content

pressure-vessel: Expose pci.ids from graphics stack provider in container

Simon McVittie requested to merge wip/smcv/pci-ids into master
  • resolve-in-sysroot: Distinguish "must be dir" from "open as dir"

    If we are just testing that an object is a directory, we don't necessarily need to actually open it.

  • resolve-in-sysroot: Add support for asserting target is a regular file

    This will allow some use-cases of _srt_file_test_in_sysroot() to bypass it and use _srt_resolve_in_sysroot() directly, which saves some syscalls if it will need to call _srt_resolve_in_sysroot() to get the sysroot-relative path anyway.

  • utils: Don't allow _srt_file_test_in_sysroot with no tests

    This would always fail, so there would be no point.

  • utils: Avoid redundant fstat() after resolving file in sysroot

    If only one type is allowed, then _srt_resolve_in_sysroot() can check it, saving a syscall.

  • PvRuntime: Add pv_runtime_take_any_from_provider()

    This encapsulates what we currently do for locale data, and will want to do in future for other files: look for one of several possible paths in the container, and take whatever we find.

  • PvRuntime: Add TAKE_FROM_PROVIDER_FLAGS_IF_REGULAR

    We'll want this for pci.ids, which we expect to be a regular file, not a directory.

  • PvRuntime: Make an array fully static and constant

    There's no need for this to be on the stack.

  • PvRuntime: Only consider locale paths if they are directories

    If /usr/lib/locale is somehow a regular file, that's not going to work.

  • PvRuntime: Try to import list of PCI IDs into container

    MangoHud wants this, to be able to display the name of a graphics card from its PCI ID. From codesearch.debian.net, it appears the canonical path is /usr/share/misc/pci.ids, with /usr/share/hwdata/pci.ids as a legacy path inherited from assuming that the hwdata package is installed, and /usr/share/pci.ids historically used on SLES.

    Resolves: #85 (closed)

Merge request reports

Loading