usbsdmux: Add Windows support#101
Conversation
Move platform specific functionality into a new platform file with custom handlers for (1) SCSI vendor commands and (2) reading the device model. Add Windows support through CreateFile+DeviceIoControl. Note that administrator privileges are required. Signed-off-by: Stefan Schake <[email protected]>
|
Hi, first of all: huge thank you for taking the time to work on this! Supporting Windows would actually be great - as you may imagine we get asked about that quite often. Since we are a company full of Linux Enthusiasts we are having some issues with getting our hands on a System running a recent version of Windows (we would prefer testing on actual hardware instead of a VM with USB pass-through) to properly test this. I did not hear too many good things about the process of installing Windows 11 without a Microsoft account though …. We will have to see.
If this works we will likely want to get this into master! We will have to see how to deal with the ongoing support, since this code path will not be well tested by us, but I think this can be solved by communicating clearly that Windows is not supported to the same level as Linux. We did not look to deep into the code itself, but I think we would want some stylistic changes, like splitting the Windows and Linux support into separate python files, that are imported on demand, and splitting the code changes into multiple commits (first some preliminary cleanup, then adding abstractions, then moving existing Linux support into a separate file and finally adding Windows support) to make the changes easier to follow. We will know more once we got around to giving this a proper round of testing. Thanks and sorry for taking so long to respond |
Move platform specific functionality into a new platform file with custom handlers for (1) SCSI vendor commands and (2) reading the device model. Add Windows support through CreateFile+DeviceIoControl. Note that administrator privileges are required.
Some documentation changes are missing, mostly submitting this to see if this something you are interested in adding (it is called Linux Automation..) and if the approach works. Tested the basic CLI functionality on Windows and Linux via WSL with a Fast device.