Commit a4c9eb91 authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

Intepret EOVERFLOW as babble in Linux USB backend

This adds a missing case to ConvertTransferResult which maps the
low-level error code EOVERFLOW to UsbTransferStatus::BABBLE, indicating
that the device sent more data than was expected.

Bug: 808181
Change-Id: I697171615153e6de53d751f216fc3a2c6287efd5
Reviewed-on: https://chromium-review.googlesource.com/898323Reviewed-by: default avatarMatt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534097}
parent a75e09c3
...@@ -111,6 +111,8 @@ UsbTransferStatus ConvertTransferResult(int rc) { ...@@ -111,6 +111,8 @@ UsbTransferStatus ConvertTransferResult(int rc) {
switch (rc) { switch (rc) {
case 0: case 0:
return UsbTransferStatus::COMPLETED; return UsbTransferStatus::COMPLETED;
case EOVERFLOW:
return UsbTransferStatus::BABBLE;
case EPIPE: case EPIPE:
return UsbTransferStatus::STALLED; return UsbTransferStatus::STALLED;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment