]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_firmware: Introduce qemuFirmwareFetchConfigs
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Feb 2019 12:16:41 +0000 (13:16 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 12 Mar 2019 14:29:44 +0000 (15:29 +0100)
commit3c876d2428ee3abbb11a50698a9e225cffb72cbc
tree5bbd6240d6b3e55af0eb4817979e4f7c18f1f32b
parent04406d87d25cd14acbacf0ea6e00c174d5f88c06
qemu_firmware: Introduce qemuFirmwareFetchConfigs

Implementation for yet another part of firmware description
specification. This one covers selecting which files to parse.

There are three locations from which description files can be
loaded. In order of preference, from most generic to most
specific these are:

  /usr/share/qemu/firmware
  /etc/qemu/firmware
  $XDG_CONFIG_HOME/qemu/firmware

If a file is found in two or more locations then the most specific
one is used. Moreover, if file is empty then it means it is
overriding some generic description and disabling it.

Again, this is described in more details and with nice examples
in firmware.json specification (qemu commit 3a0adfc9bf).

However, there's one slight difference - for the root user the
home directory is not searched. This follows rules laid out by
similar look up processes, e.g. PKI x509 certs are not searched
in /root but they are looked for under /home.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
src/qemu/qemu_firmware.c
src/qemu/qemu_firmware.h