Skip to content

Commit

Permalink
common: add ANDROID_ARG_SLOT_SUFFIX conditional compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Nascs Fang <[email protected]>
  • Loading branch information
nascs committed Nov 22, 2024
1 parent 15a2da5 commit eb6c0c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions common/spl/spl_ab.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,15 @@ int spl_ab_decrease_reset(struct blk_desc *dev_desc)

int spl_ab_bootargs_append_slot(void *fdt, char *slot)
{
char *str;
int len, ret = 0;

int ret = 0;

if (!slot)
return 0;

#ifdef ANDROID_ARG_SLOT_SUFFIX
int len;
char *str;
len = strlen(ANDROID_ARG_SLOT_SUFFIX) + strlen(slot) + 1;
str = malloc(len);
if (!str)
Expand All @@ -433,6 +436,9 @@ int spl_ab_bootargs_append_slot(void *fdt, char *slot)
printf("Append slot info to bootargs fail");

free(str);
#else
printf("ANDROID_ARG_SLOT_SUFFIX not defined. Skipping slot append.\n");
#endif

return ret;
}

0 comments on commit eb6c0c9

Please sign in to comment.