From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] commands: delpart: return success when no error occurred
Date: Wed, 14 Jan 2026 11:13:01 +0100 [thread overview]
Message-ID: <20260114101304.113538-1-a.fatoum@pengutronix.de> (raw)
Since the introduction of cdevs, this command returns 1 unconditionally.
Fix that up to return 0 on success and a more descriptive code
otherwise.
Fixes: a2b7cd183bad ("introduce cdev")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
commands/partition.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commands/partition.c b/commands/partition.c
index 7dd2fa629b6f..9444edac9e59 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -91,11 +91,11 @@ static int do_delpart(int argc, char *argv[])
err = devfs_del_partition(kbasename(argv[i]));
if (err) {
printf("cannot delete %s: %pe\n", argv[i], ERR_PTR(err));
- break;
+ return err;
}
}
- return 1;
+ return 0;
}
BAREBOX_CMD_HELP_START(delpart)
--
2.47.3
next reply other threads:[~2026-01-14 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 10:13 Ahmad Fatoum [this message]
2026-01-14 10:13 ` [PATCH 2/2] lib: cmdlinepart: support RO both in lower and upper case Ahmad Fatoum
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=20260114101304.113538-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