From 67d4e31c75a287be7becd37812ba5f71ecee6703 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Fri, 24 Mar 2023 14:46:35 +0100 Subject: [PATCH] vm_arm: reduce redundancy in template Signed-off-by: Axel Heider --- templates/seL4VMParameters.template.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/templates/seL4VMParameters.template.c b/templates/seL4VMParameters.template.c index 797d4bae..7b7ce070 100644 --- a/templates/seL4VMParameters.template.c +++ b/templates/seL4VMParameters.template.c @@ -8,10 +8,15 @@ #include #include -/*- set vm_address_config = configuration[me.name].get('vm_address_config') -*/ -/*- set vm_image_config = configuration[me.name].get('vm_image_config') -*/ -/*- set linux_address_config = configuration[me.name].get('linux_address_config') -*/ -/*- set linux_image_config = configuration[me.name].get('linux_image_config') -*/ +/*- set config = configuration[me.name] -*/ +/*- if not config -*/ + /*? raise(Exception('Missing VM configuration')) ?*/ +/*- endif -*/ + +/*- set vm_address_config = config.get('vm_address_config') -*/ +/*- set vm_image_config = config.get('vm_image_config') -*/ +/*- set linux_address_config = config.get('linux_address_config') -*/ +/*- set linux_image_config = config.get('linux_image_config') -*/ /*# For legacy compatibility, a fall back to the standard Linux entry exists. #*/ /*- set is_64_bit = (8 == macros.get_word_size(options.architecture)) -*/