Reporting IOReturn errors...
Reporting IOReturn errors...
- Subject: Reporting IOReturn errors...
- From: Dan Joumaa <email@hidden>
- Date: Sat, 1 Oct 2005 16:22:39 -0700
Hello,
if( responseTimeout ) {
result = bulkInPipe->Read( inBufferDescriptor, responseTimeout, 0,
inBufferDescriptor->getLength( ) );
if( result == kIOReturnSuccess ) // success
if( response->command.status >> 7 ) // Was there an error?
continue;
else { // failure - hits failure
if( result == kIOReturnTimeout )
IOLog( "MyDriver::sendCommand( ) - A USB read "
"timeout occured.\n" );
else
IOLog( "MyDriver::sendCommand( ) - Failed to "
"read. Error: %4x\n", err_get_code(result) ); // -----outputs
Error 0??-----
}
}
When I plug in my USB device, everything runs fine until it runs up to
the above piece of code. It outputs "Failed to read. Error: 0" to
system.log. I'm assuming that kIOReturnSuccess == 0, and the if should
have executed the success code. The last thing that I could think of is
that I am not outputting the IOReturn error code correctly.
In breif: How would one correctly output an IOReturn error code through
IOLog? If my above code is doing it correctly already, what can error 0
translate to?
--ness
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden