[libvirt] [PATCH 4/6] bhyve: enumerate UEFI firmwares

Daniel P. Berrange berrange at redhat.com
Thu Mar 9 15:21:21 UTC 2017


On Sun, Feb 12, 2017 at 07:12:32PM +0400, Roman Bogorodskiy wrote:
> From: Fabian Freyer <fabian.freyer at physik.tu-berlin.de>
> 
> Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
> ---
>  src/bhyve/bhyve_capabilities.c | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c
> index 13b4835a8..9dec66b11 100644
> --- a/src/bhyve/bhyve_capabilities.c
> +++ b/src/bhyve/bhyve_capabilities.c
> @@ -22,6 +22,9 @@
>   */
>  #include <config.h>
>  #include <sys/utsname.h>
> +#include <dirent.h>
> +#include <stdio.h>
> +#include <sys/types.h>
>  
>  #include "viralloc.h"
>  #include "virfile.h"
> @@ -114,11 +117,35 @@ virBhyveDomainCapsBuild(const char *emulatorbin,
>                          virDomainVirtType virttype)
>  {
>      virDomainCapsPtr caps = NULL;
> +    DIR *dir;
> +    struct dirent *entry;
> +    const char *firmware_dir = "/usr/local/share/uefi-firmware";

Is this path really something that's ok to hard code like this ?  I'm not
familiar with *BSD filesystem layout conventions, but on Lnux, /usr/local
would not be a typical directory for system provided firmware - /usr/share
would be expected. This feels like something that ought to be overridable
by the user perhaps in a /etc/libvirt/bhyve.conf file, similar to how
QEMU allows configurable firmware locations


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|




More information about the libvir-list mailing list