[PATCH v2 6/8] cmd: ubi: expose more APIs to public

Simon Glass sjg at chromium.org
Wed Apr 22 00:46:58 CEST 2026


Hi Weijie,

On 2026-04-21T08:35:39, 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,10 +47,15 @@
> +int ubi_detach(void);
> +int ubi_create_vol(const char *volume, int64_t size, int dynamic, int vol_id,
> +                bool skipcheck);
> +struct ubi_volume *ubi_find_volume(const char *volume);
> +int ubi_remove_vol(const char *volume);

Looking at patch 8, only ubi_find_volume() and ubi_create_vol() are
used by the env code. Please can you either only export the functions
actually needed, or mention why they are exported in the commit
message.

Also, the dynamic parameter is declared as int but used as a boolean,
so could become a bool ?

Regards,
Simon


More information about the U-Boot mailing list