Tiny Core Base > TCB Bugs

TCL7.2 tc-config waitusb sleeps before readiness check

(1/2) > >>

6xis:
In stock TCL 7.2, tc-config's waitusb code performs a 0.25 second sleep before performing the initial device readiness check.  For each waitusb'd device which is already in a ready state, we unnecessarily wait 0.25 seconds.

This patch refactors the waitusb code to perform the readiness check before sleeping:
http://patches.tinycorelinux.net/uploaded/tc_config.patch__waitusb_check_before_sleep

I've posted a side-by-side video showing the timing difference in head-to-head video and with a simple test case at:
https://www.youtube.com/watch?v=kgjXxyIPKq8

Thank you,

jacob at 6x.is

Misalf:
What about this?

--- Code: --- sleep 0.25
blkid -lt $dev >/dev/null && timeout=0

--- End code ---

--- Code: --- blkid -lt $dev >/dev/null && timeout=0 || sleep 0.25

--- End code ---

6xis:
Looks good to me.

curaga:
That's the first video patch I've seen. Even though I read very fast, some of the text frames were too quick for me, you may want to increase the time in the future.

I'll apply Misalf's version soon, maybe tomorrow.

curaga:
Applied, thanks to both.

Navigation

[0] Message Index

[#] Next page

Go to full version