parent
84c336fe34
commit
bbaab5d3ce
@ -0,0 +1,62 @@
|
|||||||
|
From 7261632228be96aeeaf1068f01639d506368f692 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Williamson <awilliam@redhat.com>
|
||||||
|
Date: Tue, 18 Oct 2016 11:23:52 -0700
|
||||||
|
Subject: [PATCH] Factor out and update known UEFI firmware locations
|
||||||
|
|
||||||
|
We had two files defining the same list of known locations
|
||||||
|
for the OVMF (UEFI) firmware file, so factor them into a
|
||||||
|
shared array provided by bmwqemu. Also Fedora now has a
|
||||||
|
distro edk2-ovmf package, so add the pure EFI firmware from
|
||||||
|
that to the list.
|
||||||
|
---
|
||||||
|
backend/qemu.pm | 5 +----
|
||||||
|
bmwqemu.pm | 4 ++++
|
||||||
|
consoles/sshVirtsh.pm | 4 +---
|
||||||
|
3 files changed, 6 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/backend/qemu.pm b/backend/qemu.pm
|
||||||
|
index 6022c0e..6b94177 100644
|
||||||
|
--- a/backend/qemu.pm
|
||||||
|
+++ b/backend/qemu.pm
|
||||||
|
@@ -255,10 +255,7 @@ sub start_qemu {
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($vars->{UEFI} && $vars->{ARCH} eq 'x86_64' && !$vars->{BIOS}) {
|
||||||
|
- # We have to try and find a firmware for UEFI. These are known
|
||||||
|
- # locations for openSUSE and Fedora (respectively).
|
||||||
|
- my @known = ('/usr/share/qemu/ovmf-x86_64-ms.bin', '/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd');
|
||||||
|
- foreach my $firmware (@known) {
|
||||||
|
+ foreach my $firmware (@bmwqemu::ovmf_locations) {
|
||||||
|
if (-e $firmware) {
|
||||||
|
$vars->{BIOS} = $firmware;
|
||||||
|
last;
|
||||||
|
diff --git a/bmwqemu.pm b/bmwqemu.pm
|
||||||
|
index 75109b5..af774b8 100755
|
||||||
|
--- a/bmwqemu.pm
|
||||||
|
+++ b/bmwqemu.pm
|
||||||
|
@@ -59,6 +59,10 @@ our $istty;
|
||||||
|
our $direct_output;
|
||||||
|
our $standstillthreshold = scale_timeout(600);
|
||||||
|
|
||||||
|
+# Known locations of OVMF (UEFI) firmware: first is openSUSE, second is
|
||||||
|
+# the kraxel.org nightly packages, third is Fedora's edk2-ovmf package.
|
||||||
|
+our @ovmf_locations = ('/usr/share/qemu/ovmf-x86_64-ms.bin', '/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd', '/usr/share/edk2/ovmf/OVMF_CODE.fd');
|
||||||
|
+
|
||||||
|
our %vars;
|
||||||
|
|
||||||
|
sub load_vars() {
|
||||||
|
diff --git a/consoles/sshVirtsh.pm b/consoles/sshVirtsh.pm
|
||||||
|
index 309e898..7012712 100644
|
||||||
|
--- a/consoles/sshVirtsh.pm
|
||||||
|
+++ b/consoles/sshVirtsh.pm
|
||||||
|
@@ -136,9 +136,7 @@ sub _init_xml {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (get_var('UEFI') and check_var('ARCH', 'x86_64') and !get_var('BIOS')) {
|
||||||
|
- # These are known locations for openSUSE and Fedora (respectively).
|
||||||
|
- my @known = ('/usr/share/qemu/ovmf-x86_64-ms.bin', '/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd');
|
||||||
|
- foreach my $firmware (@known) {
|
||||||
|
+ foreach my $firmware (@bmwqemu::ovmf_locations) {
|
||||||
|
if (!$self->run_cmd("test -e $firmware")) {
|
||||||
|
set_var('BIOS', $firmware);
|
||||||
|
$elem = $doc->createElement('loader');
|
@ -0,0 +1,22 @@
|
|||||||
|
From a392e12038e5f1603177bbe1f61cf2335c58f211 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Kurz <okurz@suse.de>
|
||||||
|
Date: Tue, 25 Oct 2016 09:33:12 +0200
|
||||||
|
Subject: [PATCH] baseclass: Fix missing qualifier in warn
|
||||||
|
|
||||||
|
---
|
||||||
|
backend/baseclass.pm | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/backend/baseclass.pm b/backend/baseclass.pm
|
||||||
|
index b9f3f07..26f02af 100644
|
||||||
|
--- a/backend/baseclass.pm
|
||||||
|
+++ b/backend/baseclass.pm
|
||||||
|
@@ -725,7 +725,7 @@ sub set_tags_to_assert {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
unless (ref($n) eq 'needle' && $n->{name}) {
|
||||||
|
- warn "invalid needle passed <" . ref($n) . "> " . pp($n);
|
||||||
|
+ warn "invalid needle passed <" . ref($n) . "> " . bmwqemu::pp($n);
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
push @$needles, $n;
|
@ -0,0 +1,22 @@
|
|||||||
|
From 7ce434476407f967888cb7439b412d86a6ace70d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Kurz <okurz@suse.de>
|
||||||
|
Date: Tue, 25 Oct 2016 21:50:18 +0200
|
||||||
|
Subject: [PATCH] vnc_base: Prevent 'uninitialized' warning in mouse_move
|
||||||
|
|
||||||
|
---
|
||||||
|
consoles/vnc_base.pm | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/consoles/vnc_base.pm b/consoles/vnc_base.pm
|
||||||
|
index 6d15610..7396d83 100644
|
||||||
|
--- a/consoles/vnc_base.pm
|
||||||
|
+++ b/consoles/vnc_base.pm
|
||||||
|
@@ -183,6 +183,8 @@ sub release_key {
|
||||||
|
|
||||||
|
sub _mouse_move {
|
||||||
|
my ($self, $x, $y) = @_;
|
||||||
|
+ $x //= 0;
|
||||||
|
+ $y //= 0;
|
||||||
|
|
||||||
|
if ($self->{mouse}->{x} == $x && $self->{mouse}->{y} == $y) {
|
||||||
|
# in case the mouse is moved twice to the same position
|
Loading…
Reference in new issue