Skip to content

Commit

Permalink
serial: 不打印 command_recv 的 ETIMEDOUT 异常
Browse files Browse the repository at this point in the history
* 上层处理掉了

Signed-off-by: xychen <[email protected]>
  • Loading branch information
xychen committed Mar 13, 2024
1 parent cf5ab32 commit c31cac0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libcskburn_serial/src/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ command(cskburn_serial_device_t *dev, uint8_t op, uint16_t in_len, uint32_t in_c

uint8_t *res_ptr;
if ((ret = command_recv(dev, op, &res_ptr, timeout)) < 0) {
LOGD_RET(ret, "DEBUG: Failed to read command %02X", op);
if (ret != -ETIMEDOUT) {
LOGD_RET(ret, "DEBUG: Failed to read command %02X", op);
}
goto exit;
}

Expand Down
4 changes: 3 additions & 1 deletion libslip/src/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ slip_read(slip_dev_t *dev, uint8_t *buf, size_t count, uint64_t timeout)
continue;
}
} else if (r < 0) {
LOGD_RET(r, "DEBUG: Failed reading command");
if (r != -ETIMEDOUT) {
LOGD_RET(r, "DEBUG: Failed reading command");
}
return r;
}

Expand Down

0 comments on commit c31cac0

Please sign in to comment.