Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
DISCONTINUED:openSUSE:11.1:Update
xen
reenable-block-protocols.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reenable-block-protocols.patch of Package xen
Index: xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py =================================================================== --- xen-3.3.1-testing.orig/tools/python/xen/xend/server/blkif.py +++ xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py @@ -18,6 +18,7 @@ import re import string +import os from xen.util import blkif import xen.util.xsm.xsm as security @@ -35,6 +36,13 @@ class BlkifController(DevController): """ DevController.__init__(self, vm) + def _isValidProtocol(self, protocol): + if protocol in ('phy', 'file', 'tap'): + return True + + return os.access('/etc/xen/scripts/block-%s' % protocol, os.X_OK) + + def getDeviceDetails(self, config): """@see DevController.getDeviceDetails""" uname = config.get('uname', '') @@ -56,10 +64,8 @@ class BlkifController(DevController): else: try: (typ, params) = string.split(uname, ':', 1) - if typ not in ('phy', 'file', 'tap'): - raise VmError( - 'Block device must have "phy", "file" or "tap" ' - 'specified to type') + if not self._isValidProtocol(typ): + raise VmError('Block device type "%s" is invalid.' % typ) except ValueError: raise VmError( 'Block device must have physical details specified')
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor