Closed weiying-chen closed 2 months ago
Usually for a USB pendrive to be shown in the system as a disk a kernel driver exists, which converts the block device operations into the lower-level USB transactions. However by running this example you detached the kernel driver from it (https://github.com/a1ien/rusb/blob/master/examples/read_device.rs#L162 ) , so that rusb
can talk to it directly.
As to why it failed: Probably the controller in the pendrive got confused and got reset or bugged out.
I compiled the read_device.rs example and ran it with sudo on Ubuntu:
It seems like the command worked but stopped halfway? Why was my USB flash drive ejected?