aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-07-12 20:16:00 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-07-12 20:16:00 +0000
commit38f0b147a57c1d64d068d3a15efde83322a5c90e (patch)
tree508d311f95dcf8e1f9617fd856561848e97ad7d7 /hw
parentbec9d989dba24e5ce4f94fcbccc841769a510bae (diff)
fixed ADB error reporting
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1010 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/cuda.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/cuda.c b/hw/cuda.c
index 1e4915f77e..c05cdeb5fe 100644
--- a/hw/cuda.c
+++ b/hw/cuda.c
@@ -545,13 +545,14 @@ static void cuda_receive_packet_from_host(CUDAState *s,
uint8_t obuf[ADB_MAX_OUT_LEN + 2];
int olen;
olen = adb_request(&adb_bus, obuf + 2, data + 1, len - 1);
- if (olen != 0) {
+ if (olen > 0) {
obuf[0] = ADB_PACKET;
obuf[1] = 0x00;
} else {
- /* empty reply */
+ /* error */
obuf[0] = ADB_PACKET;
- obuf[1] = 0x02;
+ obuf[1] = -olen;
+ olen = 0;
}
cuda_send_packet_to_host(s, obuf, olen + 2);
}