[PATCH 1/3] cmd: ubi: expose more APIs to public
Simon Glass
sjg at chromium.org
Sat Apr 18 02:47:18 CEST 2026
Hi Weijie,
On 2026-04-17T02:35:14, Weijie Gao <weijie.gao at mediatek.com> wrote:
> cmd: ubi: expose more APIs to public
>
> Export ubi_detach/ubi_create_vol/ubi_find_volume/ubi_remove_vol to
> public for better ubi manipulation used by other modules.
>
> Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
>
> cmd/ubi.c | 10 +++++-----
> include/ubi_uboot.h | 5 +++++
> 2 files changed, 10 insertions(+), 5 deletions(-)
> diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
> @@ -47,9 +47,14 @@
> +extern int ubi_create_vol(char *volume, int64_t size, int dynamic, int vol_id,
> + bool skipcheck);
> +extern struct ubi_volume *ubi_find_volume(char *volume);
> +extern int ubi_remove_vol(char *volume);
The volume parameter should be const char * since these functions do
not modify the string. In patch 3/3, env_ubi_volume_create() receives
a const char * and has to cast away const when calling these
functions. Please can you fix the signatures in both cmd/ubi.c and
ubi_uboot.h to take const char *volume.
Regards,
Simon
More information about the U-Boot
mailing list