* Print the speeds even though they are marked as not used (as the baud index

is inside the cflags) since stty for example sets them.
* Turn off debug output by default and fix a warning due to that.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42087 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-06-10 17:18:06 +00:00
parent 6e72f897f4
commit f7868b8f1a
3 changed files with 10 additions and 6 deletions

View File

@ -43,13 +43,14 @@ usb_serial_device_added(usb_device device, void **cookie)
const usb_configuration_info *configuration;
for (int i = 0; i < descriptor->num_configurations; i++) {
configuration = gUSBModule->get_nth_configuration(device, i);
if (!configuration)
if (configuration == NULL)
continue;
status = serialDevice->AddDevice(configuration);
if (status == B_OK)
if (status == B_OK) {
// Found!
break;
}
}
if (status < B_OK) {

View File

@ -117,6 +117,9 @@ ProlificDevice::SendRequestList(request_item *list, size_t length)
list[i].out ? NULL : buffer,
&bufferLength);
TRACE(" ProlificDevice::SendRequestList(): request[%d]: 0x%08lx\n", i, status);
if (status != B_OK) {
TRACE_ALWAYS("sending request list failed:0x%08lx\n", status);
}
}
return B_OK;

View File

@ -18,7 +18,7 @@
#if DEBUG
bool gLogEnabled = true;
#else
bool gLogEnabled = true;
bool gLogEnabled = false;
#endif
bool gLogToFile = false;
@ -108,12 +108,12 @@ trace_termios(struct termios *tios)
"\tc_cflag: 0x%08x\n"
"\tc_lflag: 0x%08x\n"
"\tc_line: 0x%08x\n"
// "\tc_ixxxxx: 0x%08x\n"
// "\tc_oxxxxx: 0x%08x\n"
"\tc_ispeed: 0x%08x\n"
"\tc_ospeed: 0x%08x\n"
"\tc_cc[0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x]\n",
tios->c_iflag, tios->c_oflag, tios->c_cflag, tios->c_lflag,
tios->c_line,
// tios->c_ixxxxx, tios->c_oxxxxx,
tios->c_ispeed, tios->c_ospeed,
tios->c_cc[0], tios->c_cc[1], tios->c_cc[2], tios->c_cc[3],
tios->c_cc[4], tios->c_cc[5], tios->c_cc[6], tios->c_cc[7],
tios->c_cc[8], tios->c_cc[9], tios->c_cc[10]);