From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] defaultenv: bin/devboot: propagate exit status of boot command
Date: Mon, 21 Sep 2026 14:23:28 +0200 [thread overview]
Message-ID: <20260921122329.1379536-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2026-09-21 12:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 12:23 Ahmad Fatoum [this message]
2026-09-23 6:16 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260921122329.1379536-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox