Hi Pratik,
On 11/25/25 13:47, Pratik Manvar wrote:
> Hi Stefano,
> I am using the disk partitioner with my swu file.
> But with SWUpdate v2024.12 onwards (With the commit
https://github.com/
> sbabic/swupdate/commit/b0935d27bf73f625e23533e921308f007ca952a9), I am
> facing the issue that it always skip the partitioning stuff.
>
> The reason is my hook function is returning true and that makes below
> condition always true. Could you please help me to understand this
> change? Thank you!
The change align partition to all hooks. A hook must always return two
values, and it seems you are returning just one. First is the result,
second one is the table with attribute.
A hook should be:
function(image)
......
-- then one of
return true,image
return false,image
return true, none
The last one is interpreted as "skip this" and as feeling this is what
you are doing. Try with "return true, image".
Note that the partition handler already works by compari8ng old and new
partition layout, and if nothing has changed, the handler doesm't try to
write the partition table.
>
> ```
> if (skip || partition->skip != SKIP_NONE) {
> free_image(partition);
> continue;
> }
> ```
Best regards,
Stefano Babic