xen/xend-pvscsi-recognize-also-SCSI-CDROM-devices.patch
Charles Arnold f43e68d196 - Update to c/s 28372 to include libxl fork and event fixes for
libvirt
  xen-4.4.0-testing-src.tar.bz2

- bnc#863297: xend/pvscsi: recognize also SCSI CDROM devices
  xend-pvscsi-recognize-also-SCSI-CDROM-devices.patch

- fate#316614: set migration constraints from cmdline
  fix xl migrate to print the actual error string
  libxc-pass-errno-to-callers-of-xc_domain_save.patch

- Include additional help docs for xl in xen-tools
- Apply all patches including those for unpackaged xend
  xen.spec

- fate#316614: set migration constraints from cmdline
  split existing changes into libxl and xend part
  added libxl.set-migration-constraints-from-cmdline.patch
  added xend-set-migration-constraints-from-cmdline.patch
  removed xen.migrate.tools_add_xm_migrate_--log_progress_option.patch
  removed xen.migrate.tools_set_number_of_dirty_pages_during_migration.patch
  removed xen.migrate.tools_set_migration_constraints_from_cmdline.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=299
2014-02-11 20:53:28 +00:00

28 lines
1.1 KiB
Diff

From: Olaf Hering <olaf@aepfle.de>
Date: Tue, 11 Feb 2014 15:21:01 +0100
Subject: xend/pvscsi: recognize also SCSI CDROM devices
Attaching a CDROM device with 'xm scsi-attach domU /dev/sr0 0:0:0:0'
fails because for some reason the sr driver was not handled at all in
the match list. With the change the above command succeeds and the
device is attached.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/python/xen/util/vscsi_util.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/python/xen/util/vscsi_util.py b/tools/python/xen/util/vscsi_util.py
--- a/tools/python/xen/util/vscsi_util.py
+++ b/tools/python/xen/util/vscsi_util.py
@@ -66,6 +66,9 @@ def _vscsi_get_hctl_by(phyname, scsi_devices):
if re.match('/dev/sd[a-z]+([1-9]|1[0-5])?$', phyname):
# sd driver
name = re.sub('(^/dev/)|([1-9]|1[0-5])?$', '', phyname)
+ elif re.match('/dev/sr[0-9]+$', phyname):
+ # sr driver
+ name = re.sub('^/dev/', '', phyname)
elif re.match('/dev/sg[0-9]+$', phyname):
# sg driver
name = re.sub('^/dev/', '', phyname)