* [PATCH] defaultenv: bin/devboot: propagate exit status of boot command
@ 2026-09-21 12:23 Ahmad Fatoum
2026-09-23 6:16 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-09-21 12:23 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
The script ends with cd "${saved_pwd}", so its exit status is that of
the cd and not of the boot command before it.
Save the exit status of the boot command and exit with it after
changing back to the previous directory.
Fixes: 1003a9d70373 ("defaultenv: base: add new devboot script")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
defaultenv/defaultenv-2-base/bin/devboot | 2 ++
1 file changed, 2 insertions(+)
diff --git a/defaultenv/defaultenv-2-base/bin/devboot b/defaultenv/defaultenv-2-base/bin/devboot
index 124bfec01ba3..64e4dabcb958 100644
--- a/defaultenv/defaultenv-2-base/bin/devboot
+++ b/defaultenv/defaultenv-2-base/bin/devboot
@@ -44,5 +44,7 @@ fi
echo boot ${override_args} $*
boot ${override_args} $*
+ret=$?
cd "${saved_pwd}"
+exit $ret
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] defaultenv: bin/devboot: propagate exit status of boot command
2026-09-21 12:23 [PATCH] defaultenv: bin/devboot: propagate exit status of boot command Ahmad Fatoum
@ 2026-09-23 6:16 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2026-09-23 6:16 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Mon, 21 Sep 2026 14:23:28 +0200, Ahmad Fatoum wrote:
> The script ends with cd "${saved_pwd}", so its exit status is that of
> the cd and not of the boot command before it.
>
> Save the exit status of the boot command and exit with it after
> changing back to the previous directory.
>
>
> [...]
Applied, thanks!
[1/1] defaultenv: bin/devboot: propagate exit status of boot command
https://git.pengutronix.de/cgit/barebox/commit/?id=90fb96609ef7 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-23 6:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 12:23 [PATCH] defaultenv: bin/devboot: propagate exit status of boot command Ahmad Fatoum
2026-09-23 6:16 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox