From 22f2fe6d69a25246ac024dfb32679bff3148701f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 1 Aug 2017 15:20:36 +0200 Subject: [PATCH] block: add support for devtype option QubesOS/qubes-issues#2951 --- qubes/ext/block.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubes/ext/block.py b/qubes/ext/block.py index 47e1e0ba..28c4128f 100644 --- a/qubes/ext/block.py +++ b/qubes/ext/block.py @@ -242,6 +242,11 @@ class BlockDeviceExtension(qubes.ext.Extension): raise qubes.exc.QubesValueError( 'read-only option can only have ' '\'yes\' or \'no\' value') + elif option == 'devtype': + if value not in ('disk', 'cdrom'): + raise qubes.exc.QubesValueError( + 'devtype option can only have ' + '\'disk\' or \'cdrom\' value') else: raise qubes.exc.QubesValueError( 'Unsupported option {}'.format(option))