* Put uint8 back to uint32 as per ML recommendations

* Begin using multi-architecture friendly formatting macros per ML
* Change uint32 snoozeTime to preferred bigtime_t per ML
* Thanks for the great feedback!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42062 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-06-08 22:10:59 +00:00
parent 331ecb302c
commit 5be4b532a8

View File

@ -769,8 +769,9 @@ usb_disk_device_added(usb_device newDevice, void **cookie)
// initialize this lun // initialize this lun
result = usb_disk_inquiry(lun); result = usb_disk_inquiry(lun);
for (uint8 tries = 0; tries < 8; tries++) { for (uint32 tries = 0; tries < 8; tries++) {
TRACE("usb lun %d inquiry attempt %d begin\n", i, tries); TRACE("usb lun %"B_PRIu8" inquiry attempt %"B_PRIu32" begin\n",
i, tries);
status_t ready = usb_disk_test_unit_ready(lun); status_t ready = usb_disk_test_unit_ready(lun);
if (ready == B_OK || ready == B_DEV_NO_MEDIA) { if (ready == B_OK || ready == B_DEV_NO_MEDIA) {
if (ready == B_OK) { if (ready == B_OK) {
@ -781,17 +782,20 @@ usb_disk_device_added(usb_device newDevice, void **cookie)
else if (/*usb_disk_mode_sense(lun) != B_OK*/true) else if (/*usb_disk_mode_sense(lun) != B_OK*/true)
lun->write_protected = false; lun->write_protected = false;
TRACE("usb lun %d ready. write protected = %c\n", i, TRACE("usb lun %"B_PRIu8" ready. write protected = %c\n", i,
lun->write_protected ? 'y' : 'n'); lun->write_protected ? 'y' : 'n');
break; break;
} }
TRACE("usb lun %d not ready, attempt %d\n", i, tries); TRACE("usb lun %"B_PRIu8" not ready, attempt %"B_PRIu32"\n",
i, tries);
} }
TRACE("usb lun %d inquiry attempt %d failed\n", i, tries); TRACE("usb lun %"B_PRIu8" inquiry attempt %"B_PRIu32" failed\n", i,
tries);
uint32 snoozeTime = 1000000 * tries; bigtime_t snoozeTime = 1000000 * tries;
TRACE("snoozing %lu microseconds for usb lun\n", snoozeTime); TRACE("snoozing %"B_PRIu64" microseconds for usb lun\n",
snoozeTime);
snooze(snoozeTime); snooze(snoozeTime);
} }