From 528d3d4e0fb41598c94d52f662cdf2ad0855c8a3 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Mon, 27 Sep 2021 14:50:08 +0100 Subject: [PATCH] target: Fix fallback path for kernel config loading The main path is reading /proc/config.gz. If it does not exists, the following paths are tested: '/boot/config', '/boot/config-$(uname -r)' Since the 2nd path contains a command to be executed, remove quoting of the path when using "cat". --- devlib/target.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devlib/target.py b/devlib/target.py index d0bf9fe..7f6dac1 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -249,9 +249,9 @@ class Target(object): try: return KernelConfig(self.execute('zcat /proc/config.gz')) except TargetStableError: - for path in ['/boot/config', '/boot/config-$(uname -r)']: + for path in ['/boot/config-$({} uname -r)'.format(self.busybox), '/boot/config']: try: - return KernelConfig(self.execute('cat {}'.format(quote(path)))) + return KernelConfig(self.execute('cat {}'.format(path))) except TargetStableError: pass return KernelConfig('')