From d2dbcde351794e2152163db2c1acc386e83d2eba Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 20 Aug 2014 07:46:30 +0200 Subject: [PATCH] tools: config-create: Simplify parse_dmar_devscope We do not support complex device scope paths yet, code this into the parsing function. This allows to simplify the call sites as well because parse_dmar_devscope will now read as many bytes as supported or fail. Signed-off-by: Jan Kiszka --- tools/jailhouse-config-create | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create index f8be46e..8991441 100755 --- a/tools/jailhouse-config-create +++ b/tools/jailhouse-config-create @@ -425,11 +425,11 @@ def count_cpus(): def parse_dmar_devscope(f): - offset = 0 (scope_type, scope_len, bus, dev, fn) = \ struct.unpack('