Re: [PATCH 1/3] env: mmc: refactor mmc_offset_try_partition()

2024-09-23 Thread Quentin Schulz
Hi Rasmus, On 9/19/24 8:53 AM, Rasmus Villemoes wrote: Quentin Schulz writes: -for (i = 1;;i++) { - ret = part_get_info(desc, i, &info); - if (ret < 0) - return ret; - - if (str && !strncmp((const char *)info.name, str, s

Re: [PATCH 1/3] env: mmc: refactor mmc_offset_try_partition()

2024-09-18 Thread Rasmus Villemoes
Quentin Schulz writes: >> - for (i = 1;;i++) { >> -ret = part_get_info(desc, i, &info); >> -if (ret < 0) >> -return ret; >> - >> -if (str && !strncmp((const char *)info.name, str, >> sizeof(info.name))) >> -break; >>

Re: [PATCH 1/3] env: mmc: refactor mmc_offset_try_partition()

2024-09-18 Thread Quentin Schulz
Hi Rasmus, On 9/12/24 3:41 PM, Rasmus Villemoes wrote: In preparation for fixing the handling of a the case of redundant environment defined in two separate partitions with the U-Boot env GUID, refactor the for () if (str) ... #ifdef CONFIG_FOO if (!str) .. #end

[PATCH 1/3] env: mmc: refactor mmc_offset_try_partition()

2024-09-12 Thread Rasmus Villemoes
In preparation for fixing the handling of a the case of redundant environment defined in two separate partitions with the U-Boot env GUID, refactor the for () if (str) ... #ifdef CONFIG_FOO if (!str) .. #endif to if (str) for () else if (CONFIG_FOO && !str)