Skip to content

Commit bade11c

Browse files
BillZhou734lsun100
authored andcommitted
Fix bfdump doesn't return error code in case of success
When bfdump succeeds, the return value is 8. It's the result value of write sizeof(uint64_t). This fix sets the return value to 0 after the write is successful. Signed-off-by: Dong Zhou <[email protected]>
1 parent 41c2b5f commit bade11c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rshim_cmdmode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ static int bfdump(void)
280280
printf("Failed to write: %m\n");
281281
goto done;
282282
}
283+
rc = 0;
283284
cur_len += sizeof(uint64_t);
284285
if (cur_len >= max_len)
285286
break;

0 commit comments

Comments
 (0)