Hi everyone, We have a use case that requires us to only allow certain files to pass through to the guest machine from USB storage devices.
I was told on IRC that such a feature does not exist but the easiest way to achieve our goal is to contribute a patch the the MTP device driver since other drivers operate on a filesystem level instead of a file level which is what we need. The plan is to pass the contents of each file to a program through stdin and decide based on the exit code if the file should be allowed to pass through to the guest or not. Since this is the first time I'm contributing to QEMU I'd like some guidance to where the filtering code should be. https://github.com/qemu/qemu/blob/master/hw/usb/dev-mtp.c doesn't look that complicated but I still need to understand it better to continue. Furthermore, I need to know where to add such a command line option to point QEMU to the filtering program. Would such a patch be accepted if all the requirements above are met? Best Regards, Omer Katz.