Fixed according to @marmarek request
This commit is contained in:
parent
801014f2e5
commit
03ba645009
@ -701,17 +701,16 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
break
|
break
|
||||||
if current_assignment is None:
|
if current_assignment is None:
|
||||||
# it would be very weird if this happened
|
# it would be very weird if this happened
|
||||||
|
msg.append(self.tr("Error re-assigning device ") +
|
||||||
|
ident)
|
||||||
break
|
break
|
||||||
|
|
||||||
self.vm.devices['pci'].detach(current_assignment)
|
self.vm.devices['pci'].detach(current_assignment)
|
||||||
|
|
||||||
options = {}
|
current_assignment.options['no-strict-reset'] = \
|
||||||
if ident in self.new_strict_reset_list:
|
(ident in self.new_strict_reset_list)
|
||||||
options['no-strict-reset'] = True
|
|
||||||
new_assignment = devices.DeviceAssignment(
|
self.vm.devices['pci'].attach(current_assignment)
|
||||||
self.vm.app.domains['dom0'],
|
|
||||||
ident.replace(':', '_'),
|
|
||||||
persistent=True, options=options)
|
|
||||||
self.vm.devices['pci'].attach(new_assignment)
|
|
||||||
|
|
||||||
for ass in self.vm.devices['pci'].assignments(persistent=True):
|
for ass in self.vm.devices['pci'].assignments(persistent=True):
|
||||||
if ass.ident.replace('_', ':') not in new:
|
if ass.ident.replace('_', ':') not in new:
|
||||||
@ -751,8 +750,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
|
|
||||||
def define_strict_reset_devices(self):
|
def define_strict_reset_devices(self):
|
||||||
for assignment in self.vm.devices['pci'].assignments():
|
for assignment in self.vm.devices['pci'].assignments():
|
||||||
if 'no-strict-reset' in assignment.options and \
|
if assignment.options.get('no-strict-reset', False):
|
||||||
assignment.options['no-strict-reset']:
|
|
||||||
self.current_strict_reset_list.append(
|
self.current_strict_reset_list.append(
|
||||||
assignment.ident.replace('_', ':'))
|
assignment.ident.replace('_', ':'))
|
||||||
self.new_strict_reset_list = self.current_strict_reset_list.copy()
|
self.new_strict_reset_list = self.current_strict_reset_list.copy()
|
||||||
|
Loading…
Reference in New Issue
Block a user