From 76641773be73141652c6be5c45f53c91efd144e4 Mon Sep 17 00:00:00 2001 From: Ran Hongyun Date: Thu, 23 Jul 2026 10:37:06 +0800 Subject: ubi-utils: add wear-leveling threshold parameter to ubiattach Add wl_threshold support end-to-end: expose the kernel's wear-leveling threshold via a new --wl-threshold / -w option in ubiattach, plumb it through libubi, and define it by replacing 4 bytes of padding in struct ubi_attach_req. Valid range is 2-65536; 0 means use the kernel default. Signed-off-by: Ran Hongyun Signed-off-by: David Oberhollenzer --- include/mtd/ubi-user.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/mtd') diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index bb5c0f9..601f3f4 100644 --- a/include/mtd/ubi-user.h +++ b/include/mtd/ubi-user.h @@ -284,7 +284,8 @@ struct ubi_attach_req { int16_t max_beb_per1024; int8_t disable_fm; int8_t need_resv_pool; - int8_t padding[8]; + int32_t wl_threshold; + int8_t padding[4]; }; /* -- cgit v1.2.3