diff options
| author | Weijie Gao <[email protected]> | 2026-05-20 16:27:33 +0800 |
|---|---|---|
| committer | Heiko Schocher <[email protected]> | 2026-07-08 11:30:37 +0200 |
| commit | 2818e678214f69d7c1185a493a6ca03379b3927e (patch) | |
| tree | 37df9e1f4f26321b67ded9bbf942d54287699f75 | |
| parent | d9a9d72e45c12571acb2258d669484eaef235872 (diff) | |
cmd: ubi: change the type of parameter dynamic to bool
This patch changes the type of the 'dynamic' parameter of ubi_create_vol()
to bool as it's used as a boolean.
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Weijie Gao <[email protected]>
| -rw-r--r-- | cmd/ubi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/ubi.c b/cmd/ubi.c index 8e3cfaaddbb..8d04ff61fb6 100644 --- a/cmd/ubi.c +++ b/cmd/ubi.c @@ -213,7 +213,7 @@ bad: return err; } -static int ubi_create_vol(const char *volume, int64_t size, int dynamic, +static int ubi_create_vol(const char *volume, int64_t size, bool dynamic, int vol_id, bool skipcheck) { struct ubi_mkvol_req req; @@ -765,7 +765,7 @@ static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } if (strncmp(argv[1], "create", 6) == 0) { - int dynamic = 1; /* default: dynamic volume */ + bool dynamic = true; /* default: dynamic volume */ int id = UBI_VOL_NUM_AUTO; /* Use maximum available size */ @@ -786,7 +786,7 @@ static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) /* E.g., create volume size type */ if (argc == 5) { if (strncmp(argv[4], "s", 1) == 0) - dynamic = 0; + dynamic = false; else if (strncmp(argv[4], "d", 1) != 0) { printf("Incorrect type\n"); return 1; |
