From 87a04c5371c5c2d1f6e643ee99873ebb89d5b3ad Mon Sep 17 00:00:00 2001 From: "ji.luo" Date: Tue, 12 Sep 2017 16:06:49 +0800 Subject: MA-10338-4 Correct 'fastboot getvar current-slot' command Remove the underscore prefix of current slot. Change-Id: I07a0513dfcfbf395087d57e3680c8d662ec827aa Signed-off-by: ji.luo --- lib/avb/fsl/fsl_bootctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/avb/fsl/fsl_bootctl.c b/lib/avb/fsl/fsl_bootctl.c index daed3f8b98..737be06250 100755 --- a/lib/avb/fsl/fsl_bootctl.c +++ b/lib/avb/fsl/fsl_bootctl.c @@ -125,7 +125,7 @@ int get_slotvar_avb(AvbABOps *ab_ops, char *cmd, char *buffer, size_t size) { if (!strcmp_l1("current-slot", cmd)) { int curr = get_curr_slot(&ab_data); if (curr >= 0 && curr < SLOT_NUM) - strlcpy(buffer, slot_suffix[curr], size); + strlcpy(buffer, slot_suffix[curr] + sizeof(unsigned char), size); else { strlcpy(buffer, "no bootable slot", size); return -1; -- cgit v1.2.3