On buffer read error, return B_ERROR (instead of B_OK-result from previous acquire_sem)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14474 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
31b6023a85
commit
aeb5fb20a0
@ -206,9 +206,9 @@ ps2_mouse_read(mouse_movement *userMovement)
|
|||||||
if (status < B_OK)
|
if (status < B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if (packet_buffer_read(sMouseBuffer, packet, sPacketSize) < (size_t)sPacketSize) {
|
if (packet_buffer_read(sMouseBuffer, packet, sPacketSize) != (ssize_t)sPacketSize) {
|
||||||
TRACE(("error copying buffer\n"));
|
TRACE(("error copying buffer\n"));
|
||||||
return status;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(packet[0] & 8))
|
if (!(packet[0] & 8))
|
||||||
|
Loading…
Reference in New Issue
Block a user