args.kernel.name + '-unzipped' if self._kernel_gz else '' is wrong
because '+' takes precedence over 'if ... else ...'. This results in the
kernel image name being absent from the generated command line if the
kernel is not compressed.
Fix it by using parenthesis to apply the condition only to '-unzipped'.

Signed-off-by: Jean-Jacques Hiblot <[email protected]>
---
 tools/jailhouse-cell-linux | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux
index 39893fa..df9b921 100755
--- a/tools/jailhouse-cell-linux
+++ b/tools/jailhouse-cell-linux
@@ -399,7 +399,7 @@ jailhouse cell create %s\n\
 jailhouse cell load %s linux-loader.bin -a 0x%x -s "%s" -a 0x%x %s -a 0x%x ' %
               (args.config.name, config.name, self.loader_address(),
                self.params.decode(), self.params_address(),
-               args.kernel.name + '-unzipped' if self._kernel_gz else '',
+               args.kernel.name + ('-unzipped' if self._kernel_gz else ''),
                self._kernel_addr), end='')
         if args.initrd:
             print('%s -a 0x%x ' % (args.initrd.name, self._ramdisk_addr),
-- 
2.7.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to