Skip to content

Commit

Permalink
libuartbone: make uart_read return error code upon error
Browse files Browse the repository at this point in the history
Signed-off-by: Yann Sionneau <[email protected]>
  • Loading branch information
fallen committed Mar 23, 2024
1 parent e121c66 commit b7e20eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/libuartbone/uartbone_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int uart_read(struct uartbone_ctx *ctx, uint8_t *res, size_t len) {
ret = read(ctx->fd, res + cur_pos, len - cur_pos);
if (ret <= 0) {
perror("read");
return;
return ret;
}
cur_pos += ret;
}
Expand Down

0 comments on commit b7e20eb

Please sign in to comment.