mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] commands: delpart: return success when no error occurred
@ 2026-01-14 10:13 Ahmad Fatoum
  2026-01-14 10:13 ` [PATCH 2/2] lib: cmdlinepart: support RO both in lower and upper case Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-01-14 10:13 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-14 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-14 10:13 [PATCH 1/2] commands: delpart: return success when no error occurred Ahmad Fatoum
2026-01-14 10:13 ` [PATCH 2/2] lib: cmdlinepart: support RO both in lower and upper case Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox