From 2c0d79af4a90336e3d4f84e87129372f1e157cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 15 May 2017 21:04:02 +0200 Subject: [PATCH] devices: pass attach options to device handling extension Otherwise options would be ignored... --- qubes/devices.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qubes/devices.py b/qubes/devices.py index 0b4f4708..21b8c7b3 100644 --- a/qubes/devices.py +++ b/qubes/devices.py @@ -174,10 +174,12 @@ class DeviceCollection(object): raise DeviceAlreadyAttached( 'device {!s} of class {} already attached to {!s}'.format( device, self._class, self._vm)) - self._vm.fire_event_pre('device-pre-attach:'+self._class, device=device) + self._vm.fire_event_pre('device-pre-attach:'+self._class, + device=device, options=device_assignment.options) if device_assignment.persistent: self._set.add(device_assignment) - self._vm.fire_event('device-attach:' + self._class, device=device) + self._vm.fire_event('device-attach:' + self._class, + device=device, options=device_assignment.options) def detach(self, device_assignment: DeviceAssignment): '''Detach (remove) device from domain.