fixed ADB error reporting
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1010 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									bec9d989db
								
							
						
					
					
						commit
						38f0b147a5
					
				@ -545,13 +545,14 @@ static void cuda_receive_packet_from_host(CUDAState *s,
 | 
				
			|||||||
            uint8_t obuf[ADB_MAX_OUT_LEN + 2];
 | 
					            uint8_t obuf[ADB_MAX_OUT_LEN + 2];
 | 
				
			||||||
            int olen;
 | 
					            int olen;
 | 
				
			||||||
            olen = adb_request(&adb_bus, obuf + 2, data + 1, len - 1);
 | 
					            olen = adb_request(&adb_bus, obuf + 2, data + 1, len - 1);
 | 
				
			||||||
            if (olen != 0) {
 | 
					            if (olen > 0) {
 | 
				
			||||||
                obuf[0] = ADB_PACKET;
 | 
					                obuf[0] = ADB_PACKET;
 | 
				
			||||||
                obuf[1] = 0x00;
 | 
					                obuf[1] = 0x00;
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                /* empty reply */
 | 
					                /* error */
 | 
				
			||||||
                obuf[0] = ADB_PACKET;
 | 
					                obuf[0] = ADB_PACKET;
 | 
				
			||||||
                obuf[1] = 0x02;
 | 
					                obuf[1] = -olen;
 | 
				
			||||||
 | 
					                olen = 0;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            cuda_send_packet_to_host(s, obuf, olen + 2);
 | 
					            cuda_send_packet_to_host(s, obuf, olen + 2);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user