From 688f4204ae786c081ab9c13fce0aa41390e0a576 Mon Sep 17 00:00:00 2001 From: JianjunJiang <8192542@qq.com> Date: Wed, 12 Jul 2023 15:33:14 +0800 Subject: [PATCH] [efuse]fix efuse write file command --- chips/d1_f133.c | 3 ++- chips/r528_t113.c | 3 ++- chips/v851_v853.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/chips/d1_f133.c b/chips/d1_f133.c index 9cfa273..bae362d 100644 --- a/chips/d1_f133.c +++ b/chips/d1_f133.c @@ -3255,7 +3255,7 @@ static int chip_extra(struct xfel_ctx_t * ctx, int argc, char * argv[]) efuse_write(ctx, offset, value); return 1; } - else if(!strcmp(argv[0], "write") && (argc == 2)) + else if(!strcmp(argv[0], "write") && (argc == 3)) { uint32_t offset = strtoul(argv[1], NULL, 0); uint64_t len; @@ -3282,6 +3282,7 @@ static int chip_extra(struct xfel_ctx_t * ctx, int argc, char * argv[]) efuse_write(ctx, offset + o, v); } free(buf); + return 1; } } } diff --git a/chips/r528_t113.c b/chips/r528_t113.c index d272d71..79159c0 100644 --- a/chips/r528_t113.c +++ b/chips/r528_t113.c @@ -4556,7 +4556,7 @@ static int chip_extra(struct xfel_ctx_t * ctx, int argc, char * argv[]) efuse_write(ctx, offset, value); return 1; } - else if(!strcmp(argv[0], "write") && (argc == 2)) + else if(!strcmp(argv[0], "write") && (argc == 3)) { uint32_t offset = strtoul(argv[1], NULL, 0); uint64_t len; @@ -4583,6 +4583,7 @@ static int chip_extra(struct xfel_ctx_t * ctx, int argc, char * argv[]) efuse_write(ctx, offset + o, v); } free(buf); + return 1; } } } diff --git a/chips/v851_v853.c b/chips/v851_v853.c index 4072ee9..e6e83b5 100644 --- a/chips/v851_v853.c +++ b/chips/v851_v853.c @@ -1719,7 +1719,7 @@ static int chip_extra(struct xfel_ctx_t * ctx, int argc, char * argv[]) efuse_write(ctx, offset, value); return 1; } - else if(!strcmp(argv[0], "write") && (argc == 2)) + else if(!strcmp(argv[0], "write") && (argc == 3)) { uint32_t offset = strtoul(argv[1], NULL, 0); uint64_t len; @@ -1746,6 +1746,7 @@ static int chip_extra(struct xfel_ctx_t * ctx, int argc, char * argv[]) efuse_write(ctx, offset + o, v); } free(buf); + return 1; } } }