SHA256
1
0
forked from pool/xen
xen/5370e03b-pygrub-fix-error-handling-if-no-valid-partitions-are-found.patch
Charles Arnold b94eda4466 - Upstream patches from Jan
5347b524-evtchn-eliminate-64k-ports-limitation.patch
  53aac342-x86-HVM-consolidate-and-sanitize-CR4-guest-reserved-bit-determination.patch
  53b16cd4-VT-d-ATS-correct-and-clean-up-dev_invalidate_iotlb.patch
  53b56de1-properly-reference-count-DOMCTL_-un-pausedomain-hypercalls.patch
  53cfdcc7-avoid-crash-when-doing-shutdown-with-active-cpupools.patch
  53cfddaf-x86-mem_event-validate-the-response-vcpu_id-before-acting-on-it.patch
  53cfdde4-x86-mem_event-prevent-underflow-of-vcpu-pause-counts.patch

- bnc#886801 - xl vncviewer: The first domu can be accessed by any id
  53c9151b-Fix-xl-vncviewer-accesses-port-0-by-any-invalid-domid.patch

- Upstream pygrub bug fix
  5370e03b-pygrub-fix-error-handling-if-no-valid-partitions-are-found.patch

- Fix pygrub to handle old 32 bit VMs
  pygrub-boot-legacy-sles.patch (Mike Latimer)

- Remove xen-vmresync utility.  It is an old Platespin Orchestrate
  utility that should have never been included in the Xen package.
  Updated xen.spec

- Rework xen-destroy utility included in xen-utils
  bnc#885292 and bnc#886063
  Updated xen-utils-0.1.tar.bz2

- bnc#886063 - Xen monitor fails (xl list --long output different
  from xm list --long output)
- bnc#885292 - VirtualDomain: pid_status does not know how to check
  status on SLE12

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=322
2014-07-24 19:43:18 +00:00

41 lines
1.5 KiB
Diff

Subject: tools/pygrub: Fix error handling if no valid partitions are found
From: Andrew Cooper andrew.cooper3@citrix.com Sat May 10 02:18:33 2014 +0100
Date: Mon May 12 15:52:43 2014 +0100:
Git: d75215805ce6ed20b3807955fab6a7f7a3368bee
If no partitions at all are found, pygrub never creates the name 'fs',
resulting in a NameError indicating the lack of fs, rather than a
RuntimeError explaining that no partitions were found.
Set fs to None right at the start, and use the pythonic idiom "if fs is None:"
to protect against otherwise valid values for fs which compare equal to
0/False.
Reported-by: Sven Köhler <sven.koehler@gmail.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Index: xen-4.4.0-testing/tools/pygrub/src/pygrub
===================================================================
--- xen-4.4.0-testing.orig/tools/pygrub/src/pygrub
+++ xen-4.4.0-testing/tools/pygrub/src/pygrub
@@ -760,7 +760,7 @@ if __name__ == "__main__":
usage()
sys.exit(1)
file = args[0]
-
+ fs = None
output = None
entry = None
interactive = True
@@ -882,7 +882,7 @@ if __name__ == "__main__":
sys.exit(0)
# Did looping through partitions find us a kernel?
- if not fs:
+ if fs is None:
raise RuntimeError, "Unable to find partition containing kernel"
bootcfg["kernel"] = copy_from_image(fs, chosencfg["kernel"], "kernel",