From bbd58825c4e3229577f088a22fb8253f543ea14d Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 17 Nov 2022 12:14:45 +0100 Subject: [PATCH] recovery-utils: relax command mode check As a result of the dualboot support we may end up with two 'update-firmware' commands in the rootfs. To prevent file name clashing, we may need to install the recovery-utils update-firmware as update-firmware.recovery, and then the current command mode check would fail. Relax the check, by just looking at the first character. Signed-off-by: Javier Viguera --- .../recovery-utils/recovery-reboot/recovery-reboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c index 142b2338a..7e2a360d1 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c +++ b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c @@ -87,8 +87,8 @@ "\n" /* Check if application was called as update-firmware or encrypt-partitions */ -#define IS_UPDATEFW(cmd) (!strcmp(cmd, CMD_UPDATEFW)) -#define IS_ENCRYPT(cmd) (!strcmp(cmd, CMD_ENCRYPT)) +#define IS_UPDATEFW(cmd) (cmd[0] == 'u') +#define IS_ENCRYPT(cmd) (cmd[0] == 'e') /* Actual command name */ static char *cmd_name;